All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] veth: decide peer queue count from the peer's own attributes
@ 2026-10-14  1:36 lirongqing
  2026-10-14  1:40 ` netdev-bot+sinfo
  0 siblings, 1 reply; 3+ messages in thread
From: lirongqing @ 2026-10-14  1:36 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel
  Cc: Li RongQing

From: Li RongQing <lirongqing@baidu.com>

veth_newlink() creates the peer netdev from tbp, which points at the
nested VETH_INFO_PEER attributes when they are supplied (peer_tb) and
only aliases the primary device's tb otherwise. However the queue
reduction is gated on the primary device's attributes:

	err = veth_init_queues(peer, tb);

veth_init_queues() checks !tb[IFLA_NUM_{TX,RX}_QUEUES], so for the peer
it inspects the wrong attribute set whenever nested peer attributes are
used:

 - If the user requests IFLA_NUM_TX/RX_QUEUES only for the peer, tb
   carries no such attribute and veth_init_queues() still shrinks the
   peer's real_num_{tx,rx}_queues back to 1, silently dropping the
   user's explicit multi-queue request for the peer.

 - If the user requests the counts only for the primary device, the
   peer keeps nr_possible_cpus real queues instead of the legacy
   default of 1.

Pass tbp so the peer's queue count is decided from the peer's own
attributes. When no nested peer attributes are given tbp aliases tb, so
the common case is unchanged.

Fixes: 9d3684c24a52 ("veth: create by default nr_possible_cpus queues")
Signed-off-by: Li RongQing <lirongqing@baidu.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 643b97d..07b738d 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1919,7 +1919,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.9.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] veth: decide peer queue count from the peer's own attributes
  2026-10-14  1:36 [PATCH net] veth: decide peer queue count from the peer's own attributes lirongqing
@ 2026-10-14  1:40 ` netdev-bot+sinfo
  2026-10-14  2:56   ` 答复: [外部邮件] " Li,Rongqing
  0 siblings, 1 reply; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-10-14  1:40 UTC (permalink / raw)
  To: lirongqing
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by code inspection). If it was triggered please include
   the symptoms, like the stack trace or error messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 答复: [外部邮件] Re: [PATCH net] veth: decide peer queue count from the peer's own attributes
  2026-10-14  1:40 ` netdev-bot+sinfo
@ 2026-10-14  2:56   ` Li,Rongqing
  0 siblings, 0 replies; 3+ messages in thread
From: Li,Rongqing @ 2026-10-14  2:56 UTC (permalink / raw)
  To: netdev-bot+sinfo@kernel.org
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev@vger.kernel.org, linux-kernel@vger.kernel.org

> 
> This is an automated message. This series looks like a fix, but its commit messages
> seem to be missing some information:
> 
>  - How the issue was discovered, e.g. hit in production, hit during
>    development, syzbot report, manual code inspection, LLM or static
>    analysis tool scan.
> 
>  - Whether the issue was actually triggered, or is only theoretical
>    (e.g. found by code inspection). If it was triggered please include
>    the symptoms, like the stack trace or error messages.
> 
> Please do not repost the series just to address the above. Instead, reply to this
> email with the missing information, so that reviewers can take it into account. If
> the series needs another revision for other reasons, please include the
> information in the commit messages then.
> 
> The evaluation is done by an LLM so it may be wrong, if you think that is the case
> please reply and explain.

Without this patch

#ip link add veth0 type veth     peer name veth1 numtxqueues 4 numrxqueues 4
# ethtool -l veth1
Channel parameters for veth1:
Pre-set maximums:
RX:             4
TX:             4
Other:          n/a
Combined:       n/a
Current hardware settings:
RX:             1
TX:             1
Other:          n/a
Combined:       n/a

With this patch:
ip link add veth0 type veth     peer name veth1 numtxqueues 4 numrxqueues 4
# ethtool -l veth1
Channel parameters for veth1:
Pre-set maximums:
RX:             4
TX:             4
Other:          n/a
Combined:       n/a
Current hardware settings:
RX:             4
TX:             4
Other:          n/a
Combined:       n/a

-Li

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-14  2:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  1:36 [PATCH net] veth: decide peer queue count from the peer's own attributes lirongqing
2026-10-14  1:40 ` netdev-bot+sinfo
2026-10-14  2:56   ` 答复: [外部邮件] " Li,Rongqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.