* [PATCH net-next] veth: use peer attributes to set peer real number of queues
@ 2026-10-16 16:03 Eric Dumazet
0 siblings, 0 replies; only message in thread
From: Eric Dumazet @ 2026-10-16 16:03 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, Eric Dumazet, Qiliang Yuan
veth_newlink() creates the peer from its own attributes (tbp), which
come from the nested VETH_INFO_PEER ifinfomsg when present, so the
peer num_tx_queues/num_rx_queues follow the peer IFLA_NUM_TX_QUEUES
and IFLA_NUM_RX_QUEUES.
veth_init_queues(peer, ...) is then called with the attributes of
the first device (tb) instead, so the decision to reduce the peer to
a single real queue is based on the wrong device:
ip link add va type veth peer vb numtxqueues 4
-> vb has 4 tx queues, but only 1 real tx queue.
ip link add va numtxqueues 4 type veth peer vb
-> vb keeps nr_possible_cpus real tx queues.
Pass tbp, which is tb when no peer attributes were given.
Fixes: 9d3684c24a52 ("veth: create by default nr_possible_cpus queues")
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Cc: Qiliang Yuan <odys.yuan@gmail.com>
---
drivers/net/veth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 38f263d4f06b406eaf0a801334272cd438386c14..ba8953fef979aac3868d39c8fb9b19becb47d8e9 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1924,7 +1924,7 @@ static int veth_newlink(struct net_device *dev,
priv = netdev_priv(peer);
rcu_assign_pointer(priv->peer, dev);
netdev_hold(dev, &priv->peer_tracker, GFP_KERNEL);
- err = veth_init_queues(peer, tb);
+ err = veth_init_queues(peer, tbp);
if (err)
goto err_peer_queues;
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 16:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 16:03 [PATCH net-next] veth: use peer attributes to set peer real number of queues Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox