Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.52 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== 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== 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 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) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3308F606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com 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 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) 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== 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 From: Antonio Quartulli To: intel-wired-lan@lists.osuosl.org Cc: Antonio Quartulli , 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 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 Message-ID: <20261202002203.3137573-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <179616364113.3146.14418828915964343531@kernel.org> References: <20261130213740.3323814-7-antonio@mandelbit.com> <179616364113.3146.14418828915964343531@kernel.org> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4jfJNb0BLKzLmMb > 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