mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-29 04:51:34 +00:00
Merge pull request #1052 from sboeuf/fc_fix_network
virtcontainers: network: Use multiqueue flag only when appropriate
This commit is contained in:
commit
ade738f7b7
@ -407,11 +407,15 @@ func createLink(netHandle *netlink.Handle, name string, expectedLink netlink.Lin
|
|||||||
MulticastSnooping: expectedLink.(*netlink.Bridge).MulticastSnooping,
|
MulticastSnooping: expectedLink.(*netlink.Bridge).MulticastSnooping,
|
||||||
}
|
}
|
||||||
case (&netlink.Tuntap{}).Type():
|
case (&netlink.Tuntap{}).Type():
|
||||||
|
flags := netlink.TUNTAP_VNET_HDR
|
||||||
|
if queues > 0 {
|
||||||
|
flags |= netlink.TUNTAP_MULTI_QUEUE_DEFAULTS
|
||||||
|
}
|
||||||
newLink = &netlink.Tuntap{
|
newLink = &netlink.Tuntap{
|
||||||
LinkAttrs: netlink.LinkAttrs{Name: name},
|
LinkAttrs: netlink.LinkAttrs{Name: name},
|
||||||
Mode: netlink.TUNTAP_MODE_TAP,
|
Mode: netlink.TUNTAP_MODE_TAP,
|
||||||
Queues: queues,
|
Queues: queues,
|
||||||
Flags: netlink.TUNTAP_MULTI_QUEUE_DEFAULTS | netlink.TUNTAP_VNET_HDR,
|
Flags: flags,
|
||||||
}
|
}
|
||||||
case (&netlink.Macvtap{}).Type():
|
case (&netlink.Macvtap{}).Type():
|
||||||
qlen := expectedLink.Attrs().TxQLen
|
qlen := expectedLink.Attrs().TxQLen
|
||||||
|
Loading…
Reference in New Issue
Block a user