🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Eric Dumazet Fri, 16 Oct 2026 16:03
[PATCH net-next] veth: use peer attributes to set peer real number of queues
#4064
Author: Eric Dumazet
Date: Fri, 16 Oct 2026 16:03
40 lines
6564 bytes
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
Re: [PATCH net-next] veth: use peer attributes to set peer real number of queues
#4272
Author: Jason Xing
Date: Sat, 17 Oct 2026 03:41
29 lines
10295 bytes
On Sat, Oct 17, 2026 at 12:07 AM Eric Dumazet <edumazet@kernel.org> wrote:
>
> 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>

Tested-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>

Thanks.
Re: [PATCH net-next] veth: use peer attributes to set peer real number of queues
#5629
Author: patchwork-bot+netdevbpf
Date: Tue, 20 Oct 2026 19:00
26 lines
8712 bytes
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 16 Oct 2026 18:03:51 +0200 you wrote:
> 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:
> 
> [...]

Here is the summary with links:
  - [net-next] veth: use peer attributes to set peer real number of queues
    https://git.kernel.org/netdev/net-next/c/267bc3f113d8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads