Article View: linux.kernel.netdev
Article #23875Re: [PATCH net v5 0/6] igb: fix runtime PM resume issues
From: Janis Edvarts Lacis
Date: Sat, 28 Nov 2026 13:32
Date: Sat, 28 Nov 2026 13:32
83 lines
15215 bytes
15215 bytes
On 25 Nov 00:57, Antonio Quartulli wrote: >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 > Reviewed-by: Janis Edvarts Lacis <janislacis06@gmail.com>
Technical Details
Message-ID:
<5k4igk5etdbmaweimm5ams44kwe3vzcqjmnck6a2w2iyhsfsvd@ianca2g23kva>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder3.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373131-linux-kernel-netdev=dewy.ruReferences:
<20261124235723.1135808-1-antonio@mandelbit.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder3.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373131-linux-kernel-netdev=dewy.ru From: janislacis06@gmail.com (Janis Edvarts Lacis) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v5 0/6] igb: fix runtime PM resume issues Date: Sat, 28 Nov 2026 15:32:23 +0200 Organization: Usenet Network Message-ID: <5k4igk5etdbmaweimm5ams44kwe3vzcqjmnck6a2w2iyhsfsvd@ianca2g23kva> References: <20261124235723.1135808-1-antonio@mandelbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Injection-Info: usenet.network; logging-data="955840"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:IuPMuDo7qvVDL4D5xEP2HdU0kPM= sha256:xDEGMSpCgllirn8ZRvB7OMpmL3nhaLEAshd1VkB1LkM= sha1:2qCCyp0oH/wUAEjaSwCnAbL9jjg= sha256:Ig3kiXVmvniKniZGsYSGg2Qhxrz8beiq5XR8tSG6X1Y= Content-Disposition: inline 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 4EEC2125F7D; Sat, 28 Nov 2026 16:32:49 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 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, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, 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=gmail.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 r6pRR6o7Xfxo; Sat, 28 Nov 2026 16:32:45 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373131-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 59C36125F79; Sat, 28 Nov 2026 16:32:36 +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 615C52D621; Sat, 28 Nov 2026 13:32:33 +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=1795872751; b=0pik9SA0VbW0gC+yL+wLiKzU/J/AOl8EWBHh5PJdhH8hC1k9kdORElhKQwVU7CJ3AR4j UZMZPAmgyrv38Z719CSe5T+pHLTVnGoB5WWIHquGk/h+I6f9SxzA7N0u5BGyxuiUea1XL js3pmfdEaisDRZGU1NR2b1gXXiYCfLI5a9nqPc7eHuZ/P+kVAIsA6c1Nxw53co/2x+Aes R4Aad0ylXnfwlNAopnjOaenVfA9yK3CUQ1xvALTUBTkTAlBUW/MG1OJ4YwQVD/Mj4CZJc YHsFl3ouUDRpmDmYdnMCCKvKIFIj7MOlEg28JfQDN/ZyE2tTwbEHFKWZa4VN8ZJH5Lg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795872751; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:Date:From:To:Cc:Subject:Message-ID: References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=4V2a+V6fQG2NiQXAdRuUPTgWpRpo/WBcKKqghb1iDS8=; b=yFMuRO91OmuRq5imsCKSAIfyKFiCX1fl3JcPWh3YYI4yQzRbyUe5GFFTDHwKEPGq/mZb sqDmSA7W1rQKXQ+YCwOVDmGN2uG2/paUv4P/lLGxd1RuRv/csCywKeELJg0wW542BAwNA sG60Ny4027AtLQhmilyX3ZlpxHiDcujQYrcbER551hYiZHYyFca7+a9xlWpFYhqNiMJCR kO4NRXdSmi076iE3fRXpkn/tzOzBcu7HqivnH7/pmd1/Hl5WjTULN5y7XhHNU7oMemHGa VBh7pFTG15+ObIPKdVKUnhPTRX5JTmoijzrDc0WwBhWECkfF+d54QyDwNB77/Iuwvqw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TMFbXXy3; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.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 78836606A321; Sat, 28 Nov 2026 13:32:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TMFbXXy3 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.50 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795872750; b=Oy+fm7wORVGJtsWPKwMYK9bdMxquHxY9Q9lUMn9LNy07UrgQTYMYKfo3uH6lBSDcLu4d gWwCk0k3wep0cIvl5AlDQlE9C0PPTF/fuMhU56yfbhRcrfcgg1LUamKSXG5wMaYR9n3nP eShvE/qeYIL0KMIHz6cda4jeVUTLPZhlsclTBXDPg6LQXynuHmqBFkSp67OgwWeUw5Hl4 GIg9e1I8t6zqS0sKBYmDgUjFRnn4xtvH8vNbF4EnH4/1kWYzS9IwbiyRXw0SOVLrcWJq/ cJdlKe86AC4HI+LZ5p6/A9Dr/5xpG18JOPacbnNOFZ25j8ojywwe/rT/eaeNtMOQ+oQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795872750; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=4V2a+V6fQG2NiQXAdRuUPTgWpRpo/WBcKKqghb1iDS8=; b=J5cyBm/qkzBq5M2g1nmeSqCMTnCK1TibDKlbe93QVtdxdoiR2ksyPzaDqQXP3SInzCUw kLI/X3drO48g2w4yg5J0FJa2SwB+EuvPcZJupaGOu8VURCSbbEoWS2D4ovDA/e8QgVY1U M/weGrTtnsfacYyDJAq81peFJgG7X+y4yLFomsbI0Vk6Ay7tCgsRvkOh4tspG0+hFhZWb 1j2Pumo1v3cwAQQA/Nv3Jx5TIQTGzWzj5++WpIRIXRJIQpfej5VKM3ckkYQCcQVRUiYcc 37oqh56/eVOPzzIO5yYXISiMvEXRxSI+DQP+0H6l7uGPUbUDlPYcu/TgKhz3Ou/nd3Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TMFbXXy3; arc=none smtp.remote-ip=209.85.128.50 X-Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 453E2606A31C for <netdev@vger.kernel.org>; Sat, 28 Nov 2026 13:32:30 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 453E2606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com X-Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4bb9d8e8e90so61164195e9.3 for <netdev@vger.kernel.org>; Sat, 28 Nov 2026 05:32:30 -0800 (PST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795872748; x=1796477548; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=4V2a+V6fQG2NiQXAdRuUPTgWpRpo/WBcKKqghb1iDS8=; b=TMFbXXy3VkgZTK+h4ARTANj0bd2OJWcSuDzdl4CAQt389Lpai+AVfRc4XA/gYyacly R879Dgv0XBK8CYbhAZ65Kc2El88wpAV7RM+wotXPg60QlWi7LV6TpyZIbr8Um0C23an6 u8TQHz1N77s+FngyeyQ1L9xezzYMnq3z1q5gZyPlEmGptbiiGxR+FxenDTbXlJBq90e9 mWsGq3acSFGPFShfLOaefOfjfSYazcTTWM+chxcEoBBQ9QljloO9eXgUQTZEX7eoBpeK bbiItkLRT3BRPAdlFbxhWj+dtp56eg+NcFz0UNzFKiLv8c1LTAHMzmFtQU8SlAwAy5pU W14w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795872748; x=1796477548; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=4V2a+V6fQG2NiQXAdRuUPTgWpRpo/WBcKKqghb1iDS8=; b=k6YnZeOAr8d/FGnAERs9mg5Q8RIrebADdApc2VIRxvyeRL9hrB4Vs8TOeotYze07Z5 R15qH+YUvIv2XCmQ7kSFj5OorQMHUWtn+ktlahPiIQCXAGJDseXajRMFA+xWyGxU/kt6 Ay4CZUB/lfcMuXZnYNlcqiktx3Qy/hY0AIuD6VOvmp4BLXgr90ah0Mck+WS5QoIqnMJM saFDyk8T4QlbnlrUopB1hGuI+nxdFfa78WPj6ZsJLNxuiv7Gk70Mdnili/7qe5mogyWi aGASg17bokXlrraf7Gs8j2QNX5PeX+VphX9UZziMCziv6U2QcHphNRQ+idslF94ux3P6 cwRA== X-Forwarded-Encrypted: i=1; AL+hErHYDJrbZRkDoPj+ddC8MLiSsRvVOClAXOT1zhRLqIro0psBtOftyiDD0jwg2BlyCAzWE0RMePw=@vger.kernel.org X-Gm-Message-State: APuU4Z/5vUJs+Q3kHpLQFmshOcS+xYtNTuPzkN7608QJ3wzqoICXLvTR k4BS82yxnT7/9LG6Db5XA5SdX/8uBSVB4LivdDOH5uksh49Uy+vl98za X-Gm-Gg: AZFdTZdRK62mVr9L93jFsXdLg0EGZ1VaDLP0U0gWDZ2Cu6pLtIRmWJRRBUF26B9cANq XeJ0l4B5H3Jc88fDm7+iCNC++KGIKS7lS13P5ZARkLzLYlc56YoJtEwevL0HbbiF7VZuBIlgVPn YrwIU7lNFOjd9UEpwSbSGdPt1X8DMgputD8/Ybf68q4rk9pO1gU95jP+6+XQLCgxNEfslztd00X qwA5UyUUo671GJh8WvzulRytNEu/sRc/w1P1aNfSJT6AmI9u9+NcrnzSJlBqpM1EEeZcf4zoPvT 8ZSkWJnJyIe/bjAPbulDik7PqnBYTYR0mzsLoaVOGRashpMs8Hu5jeqDDq4DB+cLyakXnvOPriO iJwh0Ox/ixx7eZLfvMMKgFn2+Qc02jPAxRJ9hztR2Bv9ZaIrI0F7WqsRSS/lZ/rJuazbcKe0Zdv RNfVmd9zMACFwqEdYbiOKz1Lp4Qp1BJOTq8762g2jYBl600fajdtTtYYyhQXqRbFM6LuQw0sgBL vw0Cr78rF0WPRkLkmv8ZqZnEHXMbH56u5i8TlTbBpQFCGeB7gTtMEi+pmYIRQDZaf3aRQkxFDqA EkDbxfRoQBF71Nx5MpsyyFgbdK1VHi+6GyAKlb0lJWRCdXLs7hI51GZSqr+UFQUCTYxmECyfefz HHJcIQPquv41NBeMUCn+4+dm/7oVqBT9PwQQm X-Received: by 2002:a05:600c:1d2a:b0:4b7:6942:39bf with SMTP id 5b1f17b1804b1-4bb88814031mr666559775e9.28.1795872748317; Sat, 28 Nov 2026 05:32:28 -0800 (PST) X-Received: from pc.tail250202.ts.net ([87.110.86.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm790112755e9.5.2026.11.28.05.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 05:32:26 -0800 (PST) X-Cc: intel-wired-lan@lists.osuosl.org, 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>, 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-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-In-Reply-To: <20261124235723.1135808-1-antonio@mandelbit.com>