containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.
Apache License 2.0
2.14k stars 775 forks source link

feature: allow configuration of num_queues for macvlan and ipvlan #985

Closed cyclinder closed 7 months ago

cyclinder commented 8 months ago

allow configuration of num_queues for macvlan and ipvlan, it may enhance network performance.

    linkAttrs := netlink.LinkAttrs{
        MTU:         conf.MTU,
        Name:        tmpName,
        ParentIndex: m.Attrs().Index,
        Namespace:   netlink.NsFd(int(netns.Fd())),
        NumTxQueues: 20,   // numtxqueue
        NumRxQueues: 20,  // numrxqueue
    }