From 23db9b4a250f1974acf052681f5f87efbd2f1b1e Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Fri, 16 Aug 2024 09:09:34 -0400 Subject: [PATCH] macvlan: add bcqueuelen setting This setting was introduced in Linux 5.11 https://github.com/torvalds/linux/commit/d4bff72c8401e6f56194ecf455db70ebc22929e2 https://github.com/iproute2/iproute2/commit/42f5642a40a70e2ad0a10563397d6aa714299390 Signed-off-by: Etienne Champetier --- plugins/main/macvlan/macvlan.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/main/macvlan/macvlan.go b/plugins/main/macvlan/macvlan.go index 9145253c5..73a4a5876 100644 --- a/plugins/main/macvlan/macvlan.go +++ b/plugins/main/macvlan/macvlan.go @@ -41,6 +41,7 @@ type NetConf struct { MTU int `json:"mtu"` Mac string `json:"mac,omitempty"` LinkContNs bool `json:"linkInContainer,omitempty"` + BcQueueLen uint32 `json:"bcqueuelen,omitempty"` RuntimeConfig struct { Mac string `json:"mac,omitempty"` @@ -245,6 +246,8 @@ func createMacvlan(conf *NetConf, ifName string, netns ns.NetNS) (*current.Inter Mode: mode, } + mv.BCQueueLen = conf.BcQueueLen + if conf.LinkContNs { err = netns.Do(func(_ ns.NetNS) error { return netlink.LinkAdd(mv)