Article View: linux.kernel.netdev
Article #22190[PATCH net v5 0/6] igb: fix runtime PM resume issues
From: Antonio Quartulli
Date: Tue, 24 Nov 2026 23:57
Date: Tue, 24 Nov 2026 23:57
80 lines
13153 bytes
13153 bytes
igb can be runtime suspended when the link goes down (with power/control set to auto). Resuming it calls functions that need RTNL without holding it (patches 2 and 4), XDP and XSK changes race with a resume (patch 5), and devices that can't signal a wake-up are suspended anyway, so their port stays down when the link comes back (patch 6). Patch 1 fixes the XSK pool disable path when the device has fewer rings than the stack has queues: a NULL dereference with VFs (a single Tx queue on 82576), or after a fallback from MSI-X to MSI on resume. Patch 3 keeps such queues while they still have an XSK pool, so that the pool can still be disabled. Tested with the 82576 emulated by QEMU, including, with test-only hooks, a runtime resume and a simulated system sleep (the suspend/resume callbacks called directly, as the test kernel has no CONFIG_SUSPEND) with the device forced to come back with MSI and a single queue. Patches 1 and 3 were tested with a zero-copy AF_XDP socket: closing it after enabling a VF oopses (queue 1, stock igb and v3) or warns and leaks (queue 2, v4), and warns after a resume forced to use MSI (v4); patch 5 by closing a socket and attaching an XDP program while runtime suspended. Not tested: real hardware and PME wake-up, a real system sleep, the MSI-X allocation failure itself, the window before the work item runs, SR-IOV with runtime PM, and a device that can wake up. Not run under KASAN. Sashiko also found two pre-existing issues in the XSK queue disable/ enable paths (the Tx NAPI isn't stopped when Rx and Tx don't share a vector; a failed buffer reallocation leaves the queue half torn down); they will be fixed separately. igc has the same issues (see the notes); Joe Damato offered to test on igc, so its fix will be sent separately. Changes in v5: - new patch 3: keep the stack's Rx queues that still have an XSK pool (Janis) - patch 4: cancel the work item before a suspend (Sashiko) - new patch 5: resume the device before changing XDP or XSK settings (Sashiko) - patch 6: check pci_dev_run_wake() when scheduling the suspend (Sashiko) Changes in v4: - patch 1: also handle queues with an Rx but no Tx ring, as with VFs: tear down the Rx ring and skip only the Tx part (Sashiko); subject changed from "don't disable rings ..." to "don't touch rings ..." Changes in v3: - new patch 1 - patch 2: set the real queue counts on system sleep resume and from a work item on runtime resume, and drop packets for queues the device doesn't have until then (Janis, Sashiko) - patch 3 (now 4): link the NAPIs from the same work item Changes in v2: - patch 2 (v2 patch 1): keep setting the queue counts in __igb_open(), only skipping them on resume (Sashiko) - mention the tested hardware in the commit messages v4: https://lore.kernel.org/netdev/20261120210134.133238-1-antonio@mandelbit.com/ v3: https://lore.kernel.org/netdev/20261119140412.163202-1-antonio@mandelbit.com/ v2: https://lore.kernel.org/netdev/20261116153041.3002666-1-antonio@mandelbit.com/ v1: https://lore.kernel.org/netdev/20261113105835.3821433-1-antonio@mandelbit.com/ Antonio Quartulli (6): igb: don't touch rings that don't exist when disabling an XSK pool igb: fix RTNL assertion when resuming from runtime suspend igb: keep the stack's Rx queues that still have an XSK pool igb: link queues to NAPIs under RTNL after runtime resume igb: resume the device before changing XDP or XSK settings igb: only allow runtime PM if the device can wake up drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 144 +++++++++++++++++----- drivers/net/ethernet/intel/igb/igb_xsk.c | 37 ++++-- 3 files changed, 143 insertions(+), 39 deletions(-) -- 2.56.1
Technical Details
Message-ID:
<20261124235723.1135808-1-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370883-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370883-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: [PATCH net v5 0/6] igb: fix runtime PM resume issues Date: Wed, 25 Nov 2026 00:57:15 +0100 Organization: Usenet Network Message-ID: <20261124235723.1135808-1-antonio@mandelbit.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="67740"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Ny/NLdf/ifhQ+XJ6wmrC2I26cQQ= sha256:4pPQYgCaL5zB6HPpkmZDn8zp2P+yNDFc/EoesUxZRfA= sha1:Gv6P/tJVC0pgBlWbu/nfbfBZHz0= sha256:Y150Px6TZjvJ2DorD85mRSVyD2gmcTHYUPnR3v9Tizo= 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 C3502125E37; Wed, 25 Nov 2026 02:58:22 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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=mandelbit.com 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 YhRQKC2dkQzC; Wed, 25 Nov 2026 02:58:19 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370883-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B6F51125E2F; Wed, 25 Nov 2026 02:58:10 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 8674A38ED1; Tue, 24 Nov 2026 23:57:52 +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=1795564668; b=txZCU/T0VSQ+NTcjCUTVpOGcXj/N3oQHHZk75WFjgIYKRuwLtQvIeoGlnJ5Z92BCVjYD 3BNzvWkrgwZ1b6ZOl16GOij5ciS7Tfi+vnqqq5ywcUrjTAoo83R0os/r3qtNSYxGsSoIN qkFh43jtDisBM69jjsjo1y3ISkTJjW29gDyPjgB07GgIvewtTGF+2FxcNeAxbERA/dJ4m xWa/XyhrElgR5paVZiUnYp9BPBQR1Vxy76/EBV7+TFkcubKT2gegN/ucOd/fWFA5Cuphk WCJIkXe5JRXTu3XaNRfofwqi/VEm2EiQeLdgsM5eHaBYjA9zlCID8BVr4SvnF5fRnLQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795564668; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=xflsaRVWDw/j7j7UccdvzcudLLakoQDeNNfP3M0KnZA=; b=iYwxO3XQkaUzo6OnQNJQ3AsM4/XuVfA/ANxN2p3/HXncDwQLUeck+MzNp63GRd8QEPSz RQL8SWl5JGwA05SUaZaUgePdCNzKYzhAwfDyOMJPtMdZXSTOt8bM9GHS+XHFZKDNidDZq 4GqCJBH1R2CShgwNyzn+RZAXzmzRqjNnvMmMsRgxhBvHOsVishIy/wqtk3RrMHMcrL1Zj uGRtsvt7rUgWP3Y3brPqgZ8AHlUAyq3MFycJ+E3Y+2aFiASPxVFD3eIDa+zpfT5LHcFbg 3RF5we13d6hkAaweAC6ZBudejksc5Fvn8lISev0KO1y+0hgTMYY0rgu3hYfCLorAjFA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=m0LXNtcq; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; 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 DD829606A330; Tue, 24 Nov 2026 23:57:47 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=m0LXNtcq X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.55 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795564662; b=U+m/4bAk4V1ottUCVom0qNCNYX+akeUUScuMxCpWvg32HT0VTvZlcULeTGmGNzPAq8/P i9DF1azuwIqW8nJF5OXvwFZp3G/p47/5jOQZC4glR+u5b+Rx8PWBL1/c8FJN6p9a2BFaP wAw8k9oOyNYtwGPgDLkEfFn6y7/1GurA6BASBbPjJOCDYfF4P9ai7HyMLA4Zm/eg2r4rl 8SQoBxHR7dHaGqX4XSi+lw/TvJHl/ZB0zJ1zKFzJ3944NKPch/nR7hydix5Oj0lN7vimr qw0kSLruJBSggO8eVGPCqbkX1+xmSZ8s8lTyq/FFK+qyUZmmOkfhnt65s2+DitoH/lw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795564662; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Rspamd-Queue-Id; bh=xflsaRVWDw/j7j7UccdvzcudLLakoQDeNNfP3M0KnZA=; b=Dsx7CUYQ5y8rDuYNwv6jVdwtvTl7FKdhKj1z7RK4pywAMdomALnM0mCH6BkDa3ByG4l2 uTSZZpZgfltggb1unlbcy5r5+7UJGp4oBNcCOqXwfiIHcw/RN1R2UiF93NL46Y6q/xmEy Waoos3U6/QfyH/uAxosybTBs1CMvmIWMnN3MtPgHk1L879lXttIsWtNEbmOp3sOrzj1DD 45+SwzinBJLF5dhEAZcm+/gLFF0qRDJV46/QR3D3FmOkyhozhmi1YIivHTaDQmSIUrXFZ TKweCSUxCy2Xs5XvscQdyG7IsY5YqaI26kuq3hfEXhB8wqMvhtuzOKDjVGfxoZTPMiw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=m0LXNtcq; arc=none smtp.remote-ip=195.10.208.55 X-Received: from mout-b-110.mailbox.org (mout-b-110.mailbox.org [195.10.208.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79E5D606A33A; Tue, 24 Nov 2026 23:57:41 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79E5D606A33A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com X-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-110.mailbox.org (Postfix) with ESMTPS id 4jZ09R5LgBzNlvx; Wed, 25 Nov 2026 00:57:31 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1795564651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xflsaRVWDw/j7j7UccdvzcudLLakoQDeNNfP3M0KnZA=; b=m0LXNtcq/2LbG2mD4m4VlkgfRKYFwbKS/LegkgV5FqAKEfNUnpXH6AYKH0aXmTdyE9b2+c gC1afL98daHcBi3pOUfh+7mqjbwj88WPe1LMzrhWLLeZKTGPwJx3fhhkHUktBAStTyMmjp J4mBpbHtO0hm7kJv1vSYwc43fP5nFs4FC6ur3FybafSu2uzX75vQBHLwPGpg79Dee3zK2a eb9PAHj6CN/3V+AlE3mqV1Ur6A9b9nR8wu7MKjx4feskHUoxBXG+lojxwUqxQeZPOgoPRB vQAq0RxWmF0yNes0CCba1hLUi2SV+0oDs+7IQht2dv8hzwi9Lw59H42sAK3pzw== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=antonio@mandelbit.com X-Cc: Antonio Quartulli <antonio@mandelbit.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, Przemek Kitszel <przemyslaw.kitszel@intel.com>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Janis Edvarts Lacis <janislacis06@gmail.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Stanislav Fomichev <sdf@fomichev.me>, Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>, Kurt Kanzenbach <kurt@linutronix.de>, Maciej Fijalkowski <maciej.fijalkowski@intel.com>, Heiner Kallweit <hkallweit1@gmail.com>, Joe Damato <joe@dama.to>, Sven Auhagen <sven.auhagen@voleatech.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org X-Mailer: git-send-email 2.56.1 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 X-Rspamd-Queue-Id: 4jZ09R5LgBzNlvx