-
Notifications
You must be signed in to change notification settings - Fork 806
Closed
Description
It does not appear possible to correctly configure the number of rx/tx queues on a veth pair.
When creating a veth pair like so:
link := nl.Veth{
LinkAttrs: nl.LinkAttrs{
Name: "outer0",
NumRxQueues: 16,
NumTxQueues: 16,
},
PeerName: "inner0",
}I would expect the outcome to be equivalent to the following ip command:
ip link add outer0 numrxqueues 16 numtxqueues 16 type veth peer inner0 numrxqueues 16 numtxqueues 16However, this library actually performs the equivalent of the following ip command:
ip link add outer0 numrxqueues 16 numtxqueues 16 type veth peer inner0The problem seems to be here, where the NumRxQueues/NumTxQueues attributes are not applied to the veth peer interface:
Lines 1277 to 1290 in 5f2fc86
| case *Veth: | |
| data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) | |
| peer := data.AddRtAttr(nl.VETH_INFO_PEER, nil) | |
| nl.NewIfInfomsgChild(peer, unix.AF_UNSPEC) | |
| peer.AddRtAttr(unix.IFLA_IFNAME, nl.ZeroTerminated(link.PeerName)) | |
| if base.TxQLen >= 0 { | |
| peer.AddRtAttr(unix.IFLA_TXQLEN, nl.Uint32Attr(uint32(base.TxQLen))) | |
| } | |
| if base.MTU > 0 { | |
| peer.AddRtAttr(unix.IFLA_MTU, nl.Uint32Attr(uint32(base.MTU))) | |
| } | |
| if link.PeerHardwareAddr != nil { | |
| peer.AddRtAttr(unix.IFLA_ADDRESS, []byte(link.PeerHardwareAddr)) | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels