From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
To: kuba@kernel.org
Cc: aleksandr.loktionov@intel.com, andrew+netdev@lunn.ch,
anthony.l.nguyen@intel.com, davem@davemloft.net,
edumazet@google.com, horms@kernel.org, jacob.e.keller@intel.com,
jtornosm@redhat.com, netdev@vger.kernel.org, pabeni@redhat.com,
przemyslaw.kitszel@intel.com, rafal.romanowski@intel.com,
sdf@fomichev.me, stable@vger.kernel.org
Subject: Re: [PATCH net 1/4] iavf: return EBUSY if reset in progress or not ready during MAC change
Date: Wed, 16 Sep 2026 12:12:56 +0200 [thread overview]
Message-ID: <20260916101257.17595-1-jtornosm@redhat.com> (raw)
In-Reply-To: <20260915092418.0aafd079@kernel.org>
Hello Jakub,
> You're not fully fixing the issue, and sprinkle in EBUSY returns to user
> space instead of waiting. I'm afraid that below the bar.
The -EBUSY here is not replacing a useful wait — during reset,
the admin queue is down and the wait would block for 2.5s on a
non-functional queue and could still fail anyway.
This patch is preparatory for patch 3/4 which replaces the
wait_event with a synchronous virtchnl send + poll, eliminating
the wait under netdev_lock entirely.
The early -EBUSY here is needed because the synchronous path in
patch 3/4 must not attempt to send a virtchnl message when the VF
is resetting or not yet initialized — the admin queue is down or
in an undefined state, the message cannot reach the PF, and the
poll would hold netdev_lock for up to 2.5s on a non-functional
queue, blocking iavf_reset_task() which also needs netdev_lock
to proceed with recovery.
In short, it prevents the synchronous poll from blocking reset
recovery by holding netdev_lock on a dead queue, without
disrupting the existing driver reset recovery flow.
I think failing fast with -EBUSY during reset/initialization is
the correct behavior: it avoids delaying reset recovery and the
caller can retry once the reset completes (milliseconds to
seconds). The full fix is in patch 3/4 which carries the Fixes:
tag and cc: stable.
Without this guard, the synchronous path in patch 3/4 would wait
for 2.5s during reset on a non-functional queue and still could
fail with -EAGAIN, while holding netdev_lock and delaying
recovery. The -EBUSY avoids that pointless wait.
Thanks
Best regards
José Ignacio
next prev parent reply other threads:[~2026-09-16 10:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 20:45 [PATCH net 0/4][pull request] Fix i40e/ice/iavf VF bonding after netdev lock changes Tony Nguyen
2026-08-21 20:45 ` [PATCH net 1/4] iavf: return EBUSY if reset in progress or not ready during MAC change Tony Nguyen
2026-08-24 19:01 ` Jakub Kicinski
2026-09-15 8:12 ` Jose Ignacio Tornos Martinez
2026-09-15 16:24 ` Jakub Kicinski
2026-09-16 10:12 ` Jose Ignacio Tornos Martinez [this message]
2026-09-25 7:18 ` Jose Ignacio Tornos Martinez
2026-09-25 19:04 ` Jakub Kicinski
2026-08-21 20:45 ` [PATCH net 2/4] i40e: skip unnecessary VF reset when setting trust Tony Nguyen
2026-08-24 19:01 ` Jakub Kicinski
2026-09-15 8:14 ` Jose Ignacio Tornos Martinez
2026-08-21 20:45 ` [PATCH net 3/4] iavf: send MAC change request synchronously Tony Nguyen
2026-08-24 19:01 ` Jakub Kicinski
2026-09-15 8:16 ` Jose Ignacio Tornos Martinez
2026-08-21 20:45 ` [PATCH net 4/4] ice: skip unnecessary VF reset when setting trust Tony Nguyen
2026-08-24 19:01 ` Jakub Kicinski
2026-09-15 8:19 ` Jose Ignacio Tornos Martinez
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=20260916101257.17595-1-jtornosm@redhat.com \
--to=jtornosm@redhat.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rafal.romanowski@intel.com \
--cc=sdf@fomichev.me \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox