πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26076

Re: [PATCH net v7 4/7] igb: keep the stack's Rx queues that still have an XSK pool

#26076
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 01:04
74 lines
10879 bytes
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
Technical Details
Message-ID: <179625985367.3146.3321880417480115004@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376188-linux-kernel-netdev=dewy.ru
References: <20261202002317.3140591-5-antonio@mandelbit.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376188-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <179625985367.3146.3321880417480115004@kernel.org>
References: <20261202002317.3140591-5-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2101502"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7sLKjnxI/Fl9DJXzDJI9KzdjXXc= sha256:xFgb08lDWK4rKrUhb+lyWfF5GrLveJwiUT18XHWHkCI=
	sha1:B82SeCPM7fk3jLXtBmIJfj6vRUs= sha256:SXRoTikBaUWtJgxklYg7ykGDmwNC4S/hrA0M5B/M5Qg=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 070F81177CF; Thu,  3 Dec 2026 04:04:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id YiVH3tEBVGDR;
	Thu,  3 Dec 2026 04:04:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376188-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 232B91177CC; Thu,  3 Dec 2026 04:04:22 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7603A27E6C; Thu,  3 Dec 2026 01:04:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796259856;
	b=vu8foaXzSeXz6TTJ68kHgmCVm8+F3odV6OecSVi7cSDD1TMqN/UuXbQcwEb3Ql9CLIKk
	 Ap+qjoGLb/+EmzhcRra4mRDu1/ap4flBuXYpFAA6VWOkGw7/qgwanvUrQ+XKmkxzlGv6r
	 4TSB2+t/iSYy07aD7EVTYZTSlncIJVirVl9Et6Dhahc4Pj56jzJkJj+nG53kszrvDI+5D
	 Z1iMuk8643TG9LstvOY2aSRZOJEXdXJuHv9vQW5R/YxtmSvlG+ZnSvr5t86GpLwTpjhsk
	 u39HuoGOJzkT2131Xu/y6v3TWpqrSnkzSp//lj64jTfnKcoR33xjsLPWRAX5IUXuwSw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796259856;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=zMaoTD/7sw7xncpxtPCGGPpYAEpLJQcyv4RP9a9tpeI=;
	b=m3yio8Bxy5Ekr5meaCYxnU+7Ii492ueaFs2M2br9yC0fSaXVEhtOR6zPbpTwvs0UWi4a
	 JnMYQWTCS8p1MJ8sh0vN8slzyxdRCMt5wQuqWvMJmQBhUrPp+2P5y424BjoilUGecttFH
	 tEDAc44jcQOTWoSsyVPK5cqiwMyPyuSA3NZHv6PutoIRfoSd0NeFeQiPaT61uddLmPsCW
	 xAkYxnSEaHBXsOm8VVu1RfQ+RClvbPSe/tqqrsgn7S7I8tjR8mY6EGTNlxIxzSEDnVu93
	 JO/3KUWeFe7yJimhphLpFM0Hy0AEfvQHgapmjbsOcdgSJgwJLiC/0+NrKjfOC8Azd+Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EDSBq0jP;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 97EB2606A690;
	Thu,  3 Dec 2026 01:04:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EDSBq0jP
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796259855;
	b=jpUSjNVkV0AG6FHcMxYl7ww3N5pGhq2JuXCzcelkXYHxr+58CMk7i79gv04RiOfZAuRS
	 1WwVCxlCVIZtw+DlRwaih+VmFMYunI+9Krmq05qwOED0++6pY+upOIQuTBMOpi3CLWzZ7
	 7Dm1DBYKP8Q8YSSeqJQOW1FfaWckhMXZD0FTedemyFYE7ohi62M5NZv1LGhmfjWrSBs+d
	 VcLQmSYvEvYnlCSZ8Ug4KYXUHMp9znFYIeF7Rhs2rpq2AJk3L7vHmWHSkb0Hia+BrbgHo
	 xHYe1ndyOHObHw6VRSbDhTBAJ4iR0JM+6eG1LpwyYh/MVIzfBBgfJp5AmpcWCfZ8/wA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796259855;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=zMaoTD/7sw7xncpxtPCGGPpYAEpLJQcyv4RP9a9tpeI=;
	b=iZ04sPFfd9ek/ucfxiHXxEFyXchbYSQ/uIZ4TfDiq2kwGpOyk+RTxIzwDPhhpcYkeh7+
	 x+dxnfFS407M7meqUJl/igiTRfzSwF/5wsEd+r+NqjLgEDGZYP7nxi+61jVWXvHN4W93b
	 sU/QI8FHEM7woUhQwbbr3OYNjO9gp9D3vKfi6pYR0mqHVTqiv24EBB/+2BeeHElHfbQBS
	 sv3eUTc5glMA+QbN4sJ7Iic76JEx8L5vpLlJ4ikJGN9tKiGyFNgsKB3RAMjKfiIdcSmJt
	 zFjo70nFxaTmVxY/3J4HkHZrBYK01hJU3sZp11YQpbNy71gd/jAz/+EW4Y/pJ3noSAw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EDSBq0jP;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7EBA606A333;
	Thu,  3 Dec 2026 01:04:15 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20B0F1F000C1;
	Thu,  3 Dec 2026 01:04:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796259855;
	bh=zMaoTD/7sw7xncpxtPCGGPpYAEpLJQcyv4RP9a9tpeI=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=EDSBq0jPWrfSb4p7HOT+DYWLNhmqHoLvgGprQvAIZ4RSJs/DJ7rMbZqSu83WhwQlG
	 ZG36ewRTbeIem9fIfvpJ9nby3UB4VxmV++rK44TbEy3dM2jf1TTzp1CBsgMyjG4FKQ
	 dxUSrWYotYXXzdPaL6qdB2Ixd2/fHuOGvH43U/f55pfw1q9lGBmdrtZhtnjtTnuOjy
	 4mpHufE2HwxmybZgC8wgGNcWpaEwhBTiIMnXOBPzqmQZJTpGIzPo0w1G8e0kH/aQH1
	 1YDMHULJH2QX53Vx2t8MnQ7Wq4VMvjVupRd7s23uLZ4i3yUtz//K/iGalVHfjq8aFE
	 LgL0CtMwlcj0g==
X-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
X-In-Reply-To: <20261202002317.3140591-5-antonio@mandelbit.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list