From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796163639; b=JqjbXcTJaFa9crFAz1ndQFghDMY8EnvE4Dn/jSd6Z6Hp8N3VtTo/PnJ+rSjzqqfYymMK c7snBKRuwEbYYNGUJ2wymPCH8VbvS/mFFMni4zrh5yw74Nzll5bquwA31srK7E6hhiAq7 gHz8UMGpv69fUfLrtWpe7Obz6OoV+qdj3esp8LELuCoPtOyyf2kqOqfQlD/cO4DKuC/jk 32FRT31EsfH6U9GOuAdO2GCXfE35En7PgsHt4B9+sqM2JPy6T9gCNUDDknX7I6W3us132 D2XwQAZhzd+1ry/vbMtqhth2Do9PmQ+POHeoe/Tfrvo5TvPjbor6eWpvNPRpc6v0fwA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796163639; 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=WfUoyhL9y2B0GtQlKof6uH9jqSpfzNC3Sb91g7FLb78=; b=IfwereQpJ73LQb1qb1f1kzIJDeG8ompM3oRvTdM5hbMtGCoG6oaDAFqWCjqEAQy4/3pJ xTJNzuHaRZDCxNWctDSiV86GmrFOEMnX0qQiqaJIuqDdDV6sSj74Vg3ytBqKGDD54+/F2 AbniUWJGmjqhDlvNg1Ti9UXSwlvkWf/BbV+57KWW76GIrnQDg9NKxiwJi0CY5Df0hzbgu lUZYjWmqOYfFIw8ImpFUeQQwI8uHljCOA0IuMA01nt9qIP2M3foQk22qNnZGxbaluU8fM S2RkAScBsmWmY5AjbznRP8jXZNbwDG31o9M5F0UuKCQw3WCR7fPOtxZMsLtKBLmUC3Q== 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="LH/lcWlf"; arc=none smtp.remote-ip=100.103.45.18 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 5AEC7606A31A; Tue, 1 Dec 2026 22:20:39 +0000 (UTC) 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=LH/lcWlf Received: by smtp.kernel.org (Postfix) with ESMTPSA id 565BD1F00893; Tue, 1 Dec 2026 22:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796163638; bh=WfUoyhL9y2B0GtQlKof6uH9jqSpfzNC3Sb91g7FLb78=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LH/lcWlf60on6Z+Kqki6n98Th6REQLrjwHPOI/Dw3SZ1IeIq7WFztevsj7EjC8soy 9uprcuHO6a9vZnP2KDc87RELawg40wQNnFIcTTOEgkBQ2vSoGzqIGtgsOH74DRAS3s j+GrjYOuO9Y2BhJMN7d4hfCqdY185ZUDS+Rgymt9VcrMWGhRBzC5suFXdi6zRHJtOP JnrQwCfNUT/E/YoYOtSQQyQgpNjs/Dy1JrwlMc6HnulPInT+p2bJMvgRv9dlQHcSUD LN+njxDOhP3hrE6ZKGFsVCqATcSUMHDyjlE3yTxtiDB54pJdrQvBzAwG2S9fnae1Og zQQI93MeFaxLw== Subject: Re: [PATCH net v6 3/7] igb: fix RTNL assertion when resuming from runtime suspend 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 Date: Tue, 01 Dec 2026 22:20:36 +0000 Message-ID: <179616363685.3146.13049074289378045040@kernel.org> In-Reply-To: <20261130213740.3323814-4-antonio@mandelbit.com> References: <20261130213740.3323814-4-antonio@mandelbit.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] At this commit, the runtime-resume path still hits the RTNL assertion the patch says it fixes. -- igb: fix RTNL assertion when resuming from runtime suspend On runtime resume, __igb_open() no longer calls netif_set_real_num_queues(), since RTNL is not held there. A new rtnl_resume_task work item does it later under RTNL. Until that work runs, igb_xmit_frame() drops packets on stack queues beyond adapter->num_tx_queues. Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562 > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 2fb9615d3bab3..5774a4d3c9810 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c [ ... ] > @@ -4181,16 +4209,15 @@ static int __igb_open(struct net_device *netdev, bool resuming) > if (err) > goto err_req_irq; > > - /* Notify the stack of the actual queue counts. */ > - err = netif_set_real_num_tx_queues(adapter->netdev, > - adapter->num_tx_queues); > - if (err) > - goto err_set_queues; > - > - err = netif_set_real_num_rx_queues(adapter->netdev, > - adapter->num_rx_queues); > - if (err) > - goto err_set_queues; > + /* Notify the stack of the actual queue counts. This needs RTNL: on > + * 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); > + if (err) > + goto err_set_queues; > + } > > /* From here on the code is the same as igb_up() */ > clear_bit(__IGB_DOWN, &adapter->state); [Severity: Medium] Does runtime resume still hit an RTNL assertion a few lines below this? Only netif_set_real_num_queues() checks rtnl_held. The loop right after clear_bit() still runs on every path: __igb_open() { ... for (i = 0; i < adapter->num_q_vectors; i++) { napi = &adapter->q_vector[i]->napi; napi_enable(napi); igb_set_queue_napi(adapter, i, napi); } ... } igb_set_queue_napi() calls netif_queue_set_napi() for the rx and tx ring of each vector. netif_queue_set_napi() in net/core/dev.c does: netdev_assert_locked_ops_compat_or_invisible(dev); For a registered igb netdev that doesn't use the instance ops lock, this becomes ASSERT_RTNL(). The resulting path would be: igb_runtime_resume() __igb_resume(dev, true) __igb_open(netdev, true, false) igb_set_queue_napi() netif_queue_set_napi() ASSERT_RTNL() If so, every async runtime resume of a running interface would still print "RTNL: assertion failed" with a WARN. The rxq->napi and txq->napi pointers would also still be written without RTNL. Also, igb_rtnl_resume_task() only restores the real queue counts. __igb_shutdown() calls igb_clear_interrupt_scheme(), which frees the q_vectors. Should the work item also link the queues to the new NAPIs under RTNL? A later patch in the series seems to fix this: "igb: link queues to NAPIs under RTNL after runtime resume". It wraps igb_set_queue_napi() in __igb_open() in an if (rtnl_held) check. It also calls a new igb_link_queue_napis() from igb_rtnl_resume_task(). Could that change be folded into this commit? As it stands, this commit is a bisect point that still triggers the assertion its subject says it fixes. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130213740.3323814-1-antonio%40mandelbit.com