Article View: linux.kernel.netdev
Article #18572Re: [PATCH net v2 1/3] igb: fix RTNL assertion when resuming from runtime suspend
From: Antonio Quartulli
Date: Wed, 18 Nov 2026 14:52
Date: Wed, 18 Nov 2026 14:52
56 lines
11668 bytes
11668 bytes
Hi Janis, thanks for the review!
On 18/11/2026 14:21, Janis Edvarts Lacis wrote:
> On 16 Nov 16:30, Antonio Quartulli wrote:
>> Since commit ac8c58f5b535 ("igb: fix deadlock caused by taking RTNL in
>> RPM resume path") __igb_resume() doesn't take RTNL for runtime resume,
>> but __igb_open() still calls netif_set_real_num_{tx,rx}_queues(), which
>> require it. An asynchronous runtime resume (e.g. after the link comes
>> back) then triggers "RTNL: assertion failed".
>>
>> Skip them when resuming. The counts are set again on every regular open,
>> which happens under RTNL; the only case left out is a fallback from
>> MSI-X to MSI during a resume, which leaves the stack with more queues
>> than the device uses until the next open.
>
> RTNL is not held only on runtime resume, it is held on a normal resume.
> __igb_open() skips netif_set_real_num_{tx,rx}_queues() for both resume
> types. Maybe it makes sense to skip them only on runtime resume when the
> RTNL is not held?
You're right.
RTNL is held on normal (system sleep) resume, so the counts can and
should be set there.
>
> May I ask why is it okay to leave out the fallback case, can't it lead
> to trouble if the counts are not updated but a fallback happens?
Ouch..you're right again.
The fallback case can't be left out: with fewer rings than the stack's
real queue count, igb_tx_queue_mapping() maps several TX queues onto
tx_ring[0], each under its own xmit lock, and igb_xsk_pool_disable() can
index a ring that doesn't exist (Sashiko reported the same on this
version....).
To summarize: in v3 I'll set the counts directly on normal resume and on
runtime resume from a work item that takes RTNL (as patch 2 already does
for the NAPI links).
Until the work item has run, igb_xmit_frame() will drop packets for
queues the device doesn't have instead of mapping them onto tx_ring[0]
(the stack drops them anyway when the count is lowered), and the XSK
disable path will skip rings that don't exist.
Best,
>
> Best regards,
> Janis
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
Technical Details
Message-ID:
<3f6b535c-fce1-41d7-90a4-b15cfa20db52@mandelbit.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.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-366201-linux-kernel-netdev=dewy.ruReferences:
<20261116153041.3002666-1-antonio@mandelbit.com> <20261116153041.3002666-2-antonio@mandelbit.com> <rab7ustlezklu43vnjkby5mqh33bgqoztlz6bv5wxkjqfvbtfd@imjngi6j72nz>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.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-366201-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 1/3] igb: fix RTNL assertion when resuming from runtime suspend Date: Wed, 18 Nov 2026 15:52:28 +0100 Organization: Usenet Network Message-ID: <3f6b535c-fce1-41d7-90a4-b15cfa20db52@mandelbit.com> References: <20261116153041.3002666-1-antonio@mandelbit.com> <20261116153041.3002666-2-antonio@mandelbit.com> <rab7ustlezklu43vnjkby5mqh33bgqoztlz6bv5wxkjqfvbtfd@imjngi6j72nz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2621425"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ONzQNr4MtSJfbGEt2NnO5hR+jtA= sha256:MHCXkr5Lk3USdexk1VP+EpkXZmzm/XFqpSVWI6VfOMw= sha1:2lpBfGCURXyVZlye4dTIbZ82mzo= sha256:yA0bgBzHAN5fVGwxP50sbd55HgMw1QRxwDtv1rTiPpE= Content-Language: en-US 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 3962F1152DF; Wed, 18 Nov 2026 17:53:42 +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 JoFwG7s6V2Rz; Wed, 18 Nov 2026 17:53:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366201-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id AACBB1152DB; Wed, 18 Nov 2026 17:53:27 +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 82848342B8; Wed, 18 Nov 2026 14:53:05 +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=1795013567; b=XKXP4xMlehPe809Jj7slWWAagEkSByf4NWgmeVrlR/0Cq0iVTDbMgT6caP0zxapPBUzs VYWQHgXYU8Ez6EMUCzU08PzY0IrEMdx4vRTe8rVlp9chT1pWs76XCusbACbuAb/wi3iae ssayY6wxlAQ4Zsw/hA44LZ2Hjy3u4CKX0XcnpgsJ8+3vGzG2j53zLVD1ZPvBS8eRcjh+1 ze7Q2Fjex+VS1EVgFNYEL+tQW+d8FbR3fx7D8FMgunjO4hLBqo3Ka15uW9xfD1x67ULQw WpUdiQ8tXwYsJaV9k8McShwWfu9zETFTCfxsZLtIRYcXA7B9mTM0wJu5ZxJmU7a+ciQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795013567; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From: Organization:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Rspamd-Queue-Id; bh=pnA9abm8tKCVM9tIK3l/Su5BC83HTMGiHZbk93iWfqI=; b=Z7+m+x3co4yfJ+KZVfAnmyk0NFxUNksk+XNNcZgq0OnGGVDjeN3piPnYBVDqVWLdMnQS lGfhcuVjR0eyS3aQWJpIVOVzU0ZA86ZmNNACv0AiyaorT2HWZdPsZs/MjcB+++n7nYCQ8 5v0VyqHVMv0F82WL0jjaLSFNRMZAatpnlhFOPKzDJVX3GyYedQ3+xcZSPGMfMldZL27lj XmEAIELhtbqmtKL6szK04aw2B7fxacUuM/PuiB+2htB0JuOcfsPw5yI/yOdnoTNLQ7Y+F dCvbCRqOV7VaCQhXG3nmFaQY81rgGCuOli1uN43DppE/i9t/JB53fsSxzXzx30DDZxg== 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=EmsZyBQW; 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 2913960A262B; Wed, 18 Nov 2026 14:52: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=EmsZyBQW X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.42 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795013561; b=vLYzhNoVMb8csXhwyzu2OgLOmNsEPP1FBHL9UizmgNkky3PhqxatRclWHYkjqWzksCXA 6lFS+LYsFQwqBqXuMeT9TqQ5pIfRzSkrH5IwnGgeCMeS1Ngi/cDM6Xu9jx40qFvdB8HZF rB0GBIQnWvTjMq4yMyTiM7Oa6rzG2RLJekufiFYRJSM6Ggav0KVjddWIukMCyVm0/RGM+ X4ILFEO7csfQhM9X0P4zaXdsyB1RyRVUKDAXTnfGc3BJxwP+znB4yjrIM9MbA0DzF1BGO uoPOodiUN324SCQYX5l18zMmoKGSpvZbO637SlyPX9q2Gi+p97ZzVgIFm8VU/56MyKw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795013561; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From: Organization:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Rspamd-Queue-Id; bh=pnA9abm8tKCVM9tIK3l/Su5BC83HTMGiHZbk93iWfqI=; b=nCQXQXYw2z6tE4h8MdB/Kfpufz+Fqe1BrDfxsyIn0FnpZSUryRwHpbZyhjAPqpvTE5xO 8fiL/tI9lFZu4S7T7a5no6puJKBbalP4Kp+jmukDDgvMdEnymhubFgmaHuOlvXPqyKS2V xqflMghJsYWYza6ARmC1nuG8psUQwM9fgrLCXQ8xqFyUUwYzvkZ9kKtnsxCMSq9hSYNao zIhZD/EDHOMRkBD0FmTqCDmSzS0t2Gdgw5XM1jGyiTchCA4rqTwF6RpV/kObvRFjvt2VN AaA7FAf/kkU5AjNPRD8+Y9F6qE2Jh3IFouXRN1RCk1XdBAUKFdTw9dv59mAh0KF79IQ== 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=EmsZyBQW; arc=none smtp.remote-ip=195.10.208.42 X-Received: from mout-b-112.mailbox.org (mout-b-112.mailbox.org [195.10.208.42]) (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 9AAB460A2613; Wed, 18 Nov 2026 14:52:40 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9AAB460A2613 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-112.mailbox.org (Postfix) with ESMTPS id 4jV4MM4M4hz5wkr; Wed, 18 Nov 2026 15:52:31 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1795013551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pnA9abm8tKCVM9tIK3l/Su5BC83HTMGiHZbk93iWfqI=; b=EmsZyBQWl3mIWf54qckm4AL2FWnWPQltJ16v4suq+m6zKB5dVSyasZC9x4pZnAgWiua/n/ qSHiG+NYJsV/y35oPsTl5upz2YjsZPhO377xLqE9m1cO5GgYVEdYOZ7ANXinkgemGyW9Wq ZLGB6TZYzCqTP9OeSvFB35JHqy+/SJF2gkztz+2t20L1WfHHItZZ0TRRl3l/hzpzxE5AxC SOfLwz0PK8yHXKqXGn+vjooG57KIJGMloU95Oi5zCisHK6NKNl5+Eulk9U8qtzhg9VwC+9 FFLJdMPaWsAxqs5lQGYP6OrXkoCQI3w3oGotOaYAcd5f3K6e4GljlrMT3n40RA== 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-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-User-Agent: Mozilla Thunderbird 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>, Heiner Kallweit <hkallweit1@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-Organization: Mandelbit SRL X-In-Reply-To: <rab7ustlezklu43vnjkby5mqh33bgqoztlz6bv5wxkjqfvbtfd@imjngi6j72nz> X-Rspamd-Queue-Id: 4jV4MM4M4hz5wkr