🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19187

[PATCH net v3 0/4] igb: fix runtime PM resume issues

#19187
From: Antonio Quartulli
Date: Thu, 19 Nov 2026 14:04
48 lines
11490 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 3), and devices that can't signal a
wake-up are suspended anyway, so their port stays down when the link
comes back (patch 4). Patch 1 fixes a NULL dereference in the XSK pool
disable path when the stack has more queues than the device, which can
happen after a fallback from MSI-X to MSI on resume.

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. 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, and
SR-IOV.

igc has the same issues (see the notes); Joe Damato offered to test on
igc, so its fix will be sent separately.

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: 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

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 (4):
  igb: don't disable rings that don't exist when disabling an XSK pool
  igb: fix RTNL assertion when resuming from runtime suspend
  igb: link queues to NAPIs under RTNL after runtime resume
  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 | 96 +++++++++++++++++------
 drivers/net/ethernet/intel/igb/igb_xsk.c  |  7 +-
 3 files changed, 80 insertions(+), 24 deletions(-)

-- 
2.56.1
Technical Details
Message-ID: <20261119140412.163202-1-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367061-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367061-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v3 0/4] igb: fix runtime PM resume issues
Date: Thu, 19 Nov 2026 15:04:06 +0100
Organization: Usenet Network
Message-ID: <20261119140412.163202-1-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2889640"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:JX3lJse49G/2l9cLN24Fmuf6w0Y= sha256:kvOVXn737WuQYBowQuBP7qTlXoS5sqwQLj/zEzsbm6A=
	sha1:Ib8PdeAGSQX3a5R/D26fIsVrFAI= sha256:WZR8QdmeU9227QDc0XuTeuXCEU0kAOUW8rcvnF+YesQ=
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 F3F4811562B; Thu, 19 Nov 2026 17:05:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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, URIBL_BLOCKED=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 n5NQqmmzzlPV;
	Thu, 19 Nov 2026 17:05:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367061-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 325EA115686; Thu, 19 Nov 2026 17:04:58 +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 ECF9D260033; Thu, 19 Nov 2026 14:04:50 +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=1795097074;
	b=b2ZfibsupFYRRdUx75gGYGU0zTwNGeCxg0gPP6LMF6sVnUmtGwx7WUT8Pj8nSl3WShz9
	 v2oT7eIfoXL6ubkgEAQE1UKwXgHUq5DPAF/i3KMxAcZVfDKUTaI14fxg/vPMrWCldrwJd
	 P3Fzmahzopfcn9JoQKdh+U3dzer91tZVgjnVQoCj/jR4qvHlwefZyP1vt2kSLMonF2ejq
	 8AFHTnpsC+fUhOWQ2qZcTHIGsWVXq1tQ95wiitLCUYBU5w8TuPAK/VMN13cy+934ur4OS
	 +4FngHQ7VDloTv8XoYD1OxEUhlb6wyXaCkBGc4ct4KInbYD6BR/4LJR8153KSk+WVsw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795097074;
	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=e6oXbuZroz8JuDwbf/JEPi4sUfj0w3WvHzrO0wj5gvg=;
	b=iFkWb4etf9UBICH9r6jPLgcMj3HOKiK3I6A/f3ZeJDoMqZ0lqC3iO1NgNsMegRyqPFTk
	 tN4liSJTF6oqmBRdtAa4BYGFVFCV5Yj3ukw/vhLzCrZ5LiZhtiNf2NU+HkfFhyL4y2l8l
	 QWMIqkMEqhED0CfAHvbEy9LZpQLdwoYTqioHJc/ROZfrBlS4Fq5bslDurLQsskdt5M9Dl
	 gIG2lPQLaq1ATejU+wzmkyZSgpgpdhm/xi3IN8AoBEt/qvYZt+G6JEccwk3NBF5WkX37Q
	 QOGoDllNgK3rKFeQp6fMWIBXR9aDeQxj9Vz6BwwcF41J/3SWyIQjPjOOimtx7Odghdg==
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=v6VIYYlx;
	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 4174A60A2600;
	Thu, 19 Nov 2026 14:04:34 +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=v6VIYYlx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795097068;
	b=iL+lL4iDRFEjsVUWCNCyzew/ngWmXjPRgvFEEsSbWHbyADzZU33NhP2DTKPKrsnR8ib2
	 4OO9DLMg9CB/2rAorfrvXZKGKbR88Mjg4dOZBrZxuxu2bJOrDyKEssvB17zbcO8MgxtOy
	 4rkG6UWG86commPiODLP/Ct5xaNhtwO65HcdicwFjew6ib7jYzdPk5RMKUeVCC3u57pDH
	 LTaRlCx7EWguwo1hA1eeADN4Vgitm5S1OKDt/1vTcJEGj+0qhLqlbsG1jsSCwyIayyrZb
	 sJM7mLNvdv2R3qo89ydaNtQJbEL01sFMHELBHRnKPn9lTkWGHIR5BzlqBsKYNBbrGkg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795097068;
	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=e6oXbuZroz8JuDwbf/JEPi4sUfj0w3WvHzrO0wj5gvg=;
	b=XpacpitZSsw2mC2/GPVKSlpMTXR3la3PTV6vaEBuxP2pfXbypfG3xZOw7L3KO7syDlIm
	 08B8FcR254Hw56HEKOb58iQRjpKPnzV8jJ1eq0QYZ/jFcj+YgtEocCQyna6IN2O6/TuAd
	 1Xci0mjzAp7WsQ1+4C1P64FL2rmUBQgLWDlRswRXlNJNdinSrpiuedOe9Lr5IJHhQprgx
	 Lj0dGlxptsmYuBfjsrGMGIS8EdKp4dp2qHiDzqy30mitm6HK6duAMCwOx0zKa236vJge/
	 ko1GqnirPu6K+nz+gd2DPOHkAnQ+aCuF1V3gLEnk/A2XVnhq4uWkSHnULGhcDDod0wg==
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=v6VIYYlx;
	arc=none smtp.remote-ip=195.10.208.47
X-Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [195.10.208.47])
	(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 BA020606A325;
	Thu, 19 Nov 2026 14:04:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA020606A325
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-107.mailbox.org (Postfix) with ESMTPS id 4jVgFG4tGmz3xTD;
	Thu, 19 Nov 2026 15:04:18 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1795097058;
	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=e6oXbuZroz8JuDwbf/JEPi4sUfj0w3WvHzrO0wj5gvg=;
	b=v6VIYYlxbXPZEfVMDV8/vAIwMqcOnpgLz3zLMoYTB996BZ1u3qCv4uLsdVvkybFcIgoK+y
	6zquKS72T1skKTK5QPxvPGZD1PuKs2TFyXz3hZl8Ag+GRqJEhNbfxpVvQkhs31+yIFKdKj
	2zVytGqlgb4pXBpTCNdfFbmlPev2nFEnwPGTpWF1w97njok9VfFbVG5QDIoptxiyviEhGb
	nE/pjwsvFaT/nd0ePCsbOWDPTKGiS+FtPedGJ/e+M3GL36koOjtAMouBU7Fyt3JHuZy9ET
	ika4xwQqFSxls5WdFIa687wcbQFMFldaoivvqWKJ4fQpxnkTFpT4h8YR/L9mNQ==
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>,
	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: 4jVgFG4tGmz3xTD