Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: antonio@mandelbit.com
Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
	przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, janislacis06@gmail.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org,  john.fastabend@gmail.com,
	sdf@fomichev.me, sriram.yagnaraman@ericsson.com,
	kurt@linutronix.de, maciej.fijalkowski@intel.com,
	hkallweit1@gmail.com, joe@dama.to, rafael@kernel.org,
	sven.auhagen@voleatech.de, netdev@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net v7 4/7] igb: keep the stack's Rx queues that still have an XSK pool
Date: Thu, 03 Dec 2026 01:04:13 +0000	[thread overview]
Message-ID: <179625985367.3146.3321880417480115004@kernel.org> (raw)
In-Reply-To: <20261202002317.3140591-5-antonio@mandelbit.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] After this patch, the comment in __igb_open()
  (drivers/net/ethernet/intel/igb/igb_main.c) no longer matches the code…

--

igb: keep the stack's Rx queues that still have an XSK pool

This patch adds igb_set_real_num_queues(). The helper keeps
real_num_rx_queues up to the highest queue that still has a zero-copy XSK
pool bound, so the pool can still be disabled after igb lowers its own
queue counts (MSI-X to MSI fallback on resume, or VF enable). The count is
lowered again at the next open.

Closes: https://lore.kernel.org/netdev/xupy6jbpnziq2qji54zjbvm7neggrwkxg3sfrhlolmrd6ysifl@zptk6ynkbu5f/

> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index 5774a4d3c9810..9752350ffc68b 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c

[ ... ]

> @@ -4213,8 +4234,7 @@ static int __igb_open(struct net_device *netdev, bool resuming,
>  	 * runtime resume igb_rtnl_resume_task() does it.
>  	 */
>  	if (rtnl_held) {
> -		err = netif_set_real_num_queues(netdev, adapter->num_tx_queues,
> -						adapter->num_rx_queues);
> +		err = igb_set_real_num_queues(adapter);

[Severity: Low]
This isn't a bug, but should the comment above this call be updated too?
The full comment in __igb_open() reads:

	/* Notify the stack of the actual queue counts. This needs RTNL: on
	 * runtime resume igb_rtnl_resume_task() does it.
	 */

With this change, igb_set_real_num_queues() can on purpose report more Rx
queues than adapter->num_rx_queues. That happens while a zero-copy pool is
still bound to a queue the device no longer has:

	for (i = netdev->real_num_rx_queues; i > rxq; i--) {
		pool = xsk_get_pool_from_qid(netdev, i - 1);
		if (pool && pool->umem->zc) {
			rxq = i;
			break;
		}
	}

So the Rx count passed to the stack is not always the device's actual
count.

Someone reading the __igb_open() comment could assume that
netdev->real_num_rx_queues == adapter->num_rx_queues after open. The
previous patch in this series had to drop that same assumption in
igb_xsk_pool_disable().

Could the comment mention that the Rx count may stay higher while a
zero-copy XSK pool is still bound to a removed queue?

>  		if (err)
>  			goto err_set_queues;
>  	}

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202002317.3140591-1-antonio%40mandelbit.com

  reply	other threads:[~2026-12-03  1:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  0:23 [PATCH net v7 0/7] igb: fix runtime PM resume issues Antonio Quartulli
2026-12-02  0:23 ` [PATCH net v7 1/7] igb: don't wait for RTNL when runtime suspending Antonio Quartulli
2026-12-03  1:04   ` netdev-bot+sashiko
2026-12-02  0:23 ` [PATCH net v7 2/7] igb: don't touch rings that don't exist when disabling an XSK pool Antonio Quartulli
2026-12-03  1:04   ` netdev-bot+sashiko
2026-12-02  0:23 ` [PATCH net v7 3/7] igb: fix RTNL assertion when resuming from runtime suspend Antonio Quartulli
2026-12-03  1:04   ` netdev-bot+sashiko
2026-12-02  0:23 ` [PATCH net v7 4/7] igb: keep the stack's Rx queues that still have an XSK pool Antonio Quartulli
2026-12-03  1:04   ` netdev-bot+sashiko [this message]
2026-12-02  0:23 ` [PATCH net v7 5/7] igb: link queues to NAPIs under RTNL after runtime resume Antonio Quartulli
2026-12-02  0:23 ` [PATCH net v7 6/7] igb: resume the device before changing XDP or XSK settings Antonio Quartulli
2026-12-03  0:23   ` sashiko-bot
2026-12-03  1:04   ` netdev-bot+sashiko
2026-12-02  0:23 ` [PATCH net v7 7/7] igb: only allow runtime PM if the device can wake up Antonio Quartulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179625985367.3146.3321880417480115004@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=antonio@mandelbit.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=janislacis06@gmail.com \
    --cc=joe@dama.to \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=rafael@kernel.org \
    --cc=sdf@fomichev.me \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=stable@vger.kernel.org \
    --cc=sven.auhagen@voleatech.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox