From 899c0efd42059b773afdca80856f5eed3dc4af7a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 4 May 2016 09:18:52 -0500 Subject: [PATCH] bridge: leave TX queue length as kernel default, not 0 Not using NewLinkAttrs() or not initializing TxQLen leaves the value as 0, which tells the kernel to set a zero-length tx_queue_len. That messes up FIFO traffic shapers (like pfifo) that use the device TX queue length as the default packet limit. This leads to a default packet limit of 0, which drops all packets. --- plugins/main/bridge/bridge.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/main/bridge/bridge.go b/plugins/main/bridge/bridge.go index 77c52156..7bbba7e5 100644 --- a/plugins/main/bridge/bridge.go +++ b/plugins/main/bridge/bridge.go @@ -101,6 +101,11 @@ func ensureBridge(brName string, mtu int) (*netlink.Bridge, error) { LinkAttrs: netlink.LinkAttrs{ Name: brName, MTU: mtu, + // Let kernel use default txqueuelen; leaving it unset + // means 0, and a zero-length TX queue messes up FIFO + // traffic shapers which use TX queue length as the + // default packet limit + TxQLen: -1, }, }