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/xupy…@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/2026…%40mandelbit.com