Article View: linux.kernel.netdev
Article #25538Re: [PATCH net v6 6/7] igb: resume the device before changing XDP or XSK settings
From: Antonio Quartulli
Date: Wed, 02 Dec 2026 00:22
Date: Wed, 02 Dec 2026 00:22
55 lines
11997 bytes
11997 bytes
> Is this check in the right place, and is running the right condition
> to gate it on?
Right, reproduced: removing a program that needs 3K buffers fails after
a resume with the interface down. In v7 the buffer size is only checked
when adding or replacing a program, and a detached device only gets the
software state updated. Adding a program is still checked against rings
that a resume has just allocated, i.e. against 2K buffers, like on a
device that has never been opened; computing the size from the MTU as
igb_set_rx_buffer_len() does can follow separately.
> Does this guard cover a device that PCI error recovery has detached?
The double open is fixed in v7 by the same change. The XSK state during
PCI error recovery is pre-existing and will be fixed separately, with
the other XSK queue issues.
> This is a pre-existing issue, but this guard also requires
> !netif_device_present(). Because of that, it doesn't catch the state left
> when the igb_open() call at the end of igb_xdp_setup() fails:
Pre-existing and not specific to resume; it needs the program change to
be undone as well, so it will be fixed separately.
> The commit message gives the cause as "__igb_resume() rebuilds the queue
> counts and the rings without RTNL". Does pm_runtime_get_sync() also
> serialise against system resume?
No. The caller you name runs on system_freezable_wq since fece8420e76f
("xsk: freeze deferred pool teardown without blocking unregister"); the
system resume path rebuilding the rings without RTNL is pre-existing and
not addressed by this series.
> The return value of pm_runtime_get_sync() is ignored because, after a
> failed resume, the callees "find the device down". Does that state stay
> the same for the rest of igb_xdp()?
It needs a resume that fails with a transient error, followed by another
resume that doesn't hold RTNL while igb_xdp() runs. I've left it, as
closing it would mean taking a lock in the resume path, which is what
ac8c58f5b535 removed.
> This isn't a bug introduced by this patch, but igb_xdp() is the only ndo
> that this patch resumes. Do igb_change_mtu() and
> igb_set_features()->igb_reinit_locked()/igb_reset() have the same problem
> on a runtime suspended device?
igb detaches the netdev while runtime suspended, and dev_set_mtu()
refuses a detached device with -ENODEV before calling ndo_change_mtu
(checked: "ip link set mtu" fails while suspended). igb_set_features()
only acts on changes of NTUPLE, RXALL and VLAN Rx stripping, which only
come through ethtool, and ethtool resumes the device first.
pw-bot: cr
Technical Details
Message-ID:
<20261202002203.3137573-1-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375449-linux-kernel-netdev=dewy.ruReferences:
<20261130213740.3323814-7-antonio@mandelbit.com> <179616364113.3146.14418828915964343531@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375449-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v6 6/7] igb: resume the device before changing XDP or XSK settings Date: Wed, 2 Dec 2026 01:22:03 +0100 Organization: Usenet Network Message-ID: <20261202002203.3137573-1-antonio@mandelbit.com> References: <20261130213740.3323814-7-antonio@mandelbit.com> <179616364113.3146.14418828915964343531@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1850628"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fMrPN+Qj5l2OTWt2QkxTCuAE2pw= sha256:birpqUvtlG0gqm5nMkRQBTfrPPwoehzJGWbs7Oxk4Dk= sha1:VHitWthpoYlpeR1QSmtBE7AppRc= sha256:CtGs59VFh6w3yNVInId9qGpkPxfJiCyIXvKySn9sMkw= 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 49DE91174F9; Wed, 2 Dec 2026 03:22:45 +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 7n1toJPH1FTz; Wed, 2 Dec 2026 03:22:41 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375449-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id C77041171E1; Wed, 2 Dec 2026 03:22:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id E620024F35; Wed, 2 Dec 2026 00:22:29 +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=1796170948; b=5eWkMVHqFeNVyFhWahqGsmZxsKCjn3wlXko/AY+u8oQ9UGtnUbOmQXDg0L/rkFeTWUwg yJy1YShtP9G6OmKwB5/tdcTCZhutYP0c4fu8R/FBigUPN4pacRgWiZEfVabi489lj9sEu RRGhVfdcRasFL7gfuanZ/tBfE3XR6YLa7ZAXrRZzQTsHicki7aUYQeWnt+RMHu9Dae4PO u3nBkYioMQMJCN9DPOk18HNFkeO39ibVzdPAH56NCPG44Co4rqrFXJeuLfMHeIfsfiERE ycZbKoja60PdmSko5da15ER5V/ne85s6KfGSR2BfiSGEVpba00tqOCmGj4X2FOwvjGA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796170948; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: 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=lwVjd2GX05IcaoMAe8YBXccVC/jYVoOXoAPM1hbryxI=; b=VRD1EVwZjcmb+Wrvd8NJwsD+24jlHfemoomyr1x/zFidCKEVv9AL1VwbIq1PshcNityY d2E4OJAQK/AgOoYf0m9LpUm0SjAGFvovNwqgWdjtVQRvWXObPoAew1xks7/gXQ/0KsQ0P qMNgDWU41l80vrBb4nf3k8MzVo9oJSRW9uUFzY0fHv7j9VoOSYsO4yrL6sGV60Wg88kqI OWWbYDKEWgSGoT4dmD6qF+n9QcgYsxroLpWBCJKfKngom5Vnv5tQdx+ROjnQQQTvTC1vn sfH7uEwIBVKxG4E2Z9k7qKX64TesJ4WCExAdcijcRZW5i/gHyBXEtdsuw5hI7+RrveA== 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=M1SzKg6C; 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 F3BB6606A325; Wed, 2 Dec 2026 00:22:27 +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=M1SzKg6C X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.52 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796170930; b=mpYG6rkI4tO4Zq8Bz2wDn3ZM15SozMYVCAawLqMnvjepapagPM94I3DwwcfVCVVgNgwl Yoe0F9OoRUA+VFk1Y9Tv8sni3hGaH7GMj/u6C1MRqROVwJGStdGDKIccn+05WAkeoAddK nUR1zsXiKJ82yz13Gz06m/E51+tzN+Eh9JUdaKwQ8faOAuO5Fvr1ZYX8kEWS24oFoHxRI BCNtsejp3anAcdoNSL6x5vQvE21nSn4eZezw7ls3rBYXfXYq7/he0vrZfUiLrrE/dO3/Y 5LT6SmsLVh+HT3jjuJyK6OiZzoroonEJoRghbzswtdUkVPMeoGi2GQrevUSW+vDyQKw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796170930; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=lwVjd2GX05IcaoMAe8YBXccVC/jYVoOXoAPM1hbryxI=; b=xfyZ+Ed+YUpMfLMCidCCN04xSadwrr0i+tvoEbpiQl7WfdZBmxVttgectElbW8u5dhYO W8X3Mtdv9BMNe0V1ri55nCBm6IKcgjGd6ZyP2HdNZn2SrNx7yRNa3N7BlQuBqsrJjrHBa Sh755u3d22JpkcMBmIaNmPeoAywGvBL8iE4VX2vMGHmt0JxX9AmqcNB9xi0xGO9Bx6l6q zqKlBgVtDAy7xOh9n1Q9zq21djZqQSPoT4O84xsS3Z4zanL+XYidEj1z/IOPv3VCuuh7v 5fGv2BxvDFlbhj8aO+D6RFadjTPeQg/o9fxKv0MuGkyGaT0B2MDbJ9jgSIvF6K2NTEw== 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=M1SzKg6C; arc=none smtp.remote-ip=195.10.208.52 X-Received: from mout-b-203.mailbox.org (mout-b-203.mailbox.org [195.10.208.52]) (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 3308F606A323; Wed, 2 Dec 2026 00:22:10 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3308F606A323 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 smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA512) (No client certificate requested) by mout-b-203.mailbox.org (Postfix) with ESMTPS id 4jfJNb0BLKzLmMb; Wed, 02 Dec 2026 01:22:07 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796170927; 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: in-reply-to:in-reply-to:references:references; bh=lwVjd2GX05IcaoMAe8YBXccVC/jYVoOXoAPM1hbryxI=; b=M1SzKg6CM8AwENbQ5QwBjtzKwPdx5Gcnf7xE44FZNgVyFoLl2yQ5DsmGAfiHfJZZXXjgYq xWeYDxXWHp50dJ7Z2jLRIoAIuvP1uw0BQNY100H6753Eer33fNmjnx7dj46P2gJLO76PGF dUwfphDxne9MDoraCxP8apACJl/JYybteZHFme5WgKI5+N2yef8OpMrPAv3TnLjdO54GYB V0DKCw5udGZo+iED3X9NzkWkkJtebjqvEThagsgl94FHqlwyUX1TduNIub8tBcrDIqlFbu agpqQ18Swh5Nm5zRCVcT8m6eu4Vm0OH2bbUk8eqr5eU9slYynA+0zoZ2W7ZsYQ== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=antonio@mandelbit.com X-Cc: Antonio Quartulli <antonio@mandelbit.com>, 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 X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <179616364113.3146.14418828915964343531@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-Rspamd-Queue-Id: 4jfJNb0BLKzLmMb