Skip to content

Commit

Permalink
macvlan: add bcqueuelen setting
Browse files Browse the repository at this point in the history
This setting was introduced in Linux 5.11
torvalds/linux@d4bff72
iproute2/iproute2@42f5642

Signed-off-by: Etienne Champetier <[email protected]>
  • Loading branch information
champtar committed Aug 18, 2024
1 parent d731e07 commit 23db9b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/main/macvlan/macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 23db9b4

Please sign in to comment.