From: Antonio Quartulli <antonio@mandelbit.com>
To: intel-wired-lan@lists.osuosl.org
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
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 [thread overview]
Message-ID: <20261202002203.3137573-1-antonio@mandelbit.com> (raw)
In-Reply-To: <179616364113.3146.14418828915964343531@kernel.org>
> 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
next prev parent reply other threads:[~2026-12-02 0:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 21:37 [PATCH net v6 0/7] igb: fix runtime PM resume issues Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 1/7] igb: don't wait for RTNL when runtime suspending Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 2/7] igb: don't touch rings that don't exist when disabling an XSK pool Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 3/7] igb: fix RTNL assertion when resuming from runtime suspend Antonio Quartulli
2026-12-01 22:20 ` netdev-bot+sashiko
2026-12-02 0:21 ` Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 4/7] igb: keep the stack's Rx queues that still have an XSK pool Antonio Quartulli
2026-12-01 22:20 ` netdev-bot+sashiko
2026-12-02 0:21 ` Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 5/7] igb: link queues to NAPIs under RTNL after runtime resume Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 6/7] igb: resume the device before changing XDP or XSK settings Antonio Quartulli
2026-12-01 21:38 ` sashiko-bot
2026-12-01 22:20 ` netdev-bot+sashiko
2026-12-02 0:22 ` Antonio Quartulli [this message]
2026-11-30 21:37 ` [PATCH net v6 7/7] igb: only allow runtime PM if the device can wake up Antonio Quartulli
2026-12-01 22:20 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202002203.3137573-1-antonio@mandelbit.com \
--to=antonio@mandelbit.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=janislacis06@gmail.com \
--cc=joe@dama.to \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rafael@kernel.org \
--cc=sdf@fomichev.me \
--cc=sriram.yagnaraman@ericsson.com \
--cc=stable@vger.kernel.org \
--cc=sven.auhagen@voleatech.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.