From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<anthony.l.nguyen@intel.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>
Subject: Re: [Intel-wired-lan] [PATCH net v3 1/5] iavf: return EBUSY if reset in progress or not ready during MAC change
Date: Fri, 17 Apr 2026 16:38:09 +0200 [thread overview]
Message-ID: <dd884d10-1a7e-4227-baaa-afa8b4b264ce@intel.com> (raw)
In-Reply-To: <20260414110006.124286-2-jtornosm@redhat.com>
On 4/14/26 13:00, Jose Ignacio Tornos Martinez wrote:
> When a MAC address change is requested while the VF is resetting or still
> initializing, return -EBUSY immediately instead of attempting the
> operation.
>
> Additionally, during early initialization states (before __IAVF_DOWN),
> the PF may be slow to respond to MAC change requests, causing long
> delays. Only allow MAC changes once the VF reaches __IAVF_DOWN state or
> later, when the watchdog is running and the VF is ready for operations.
>
> After commit ad7c7b2172c3 ("net: hold netdev instance lock
> during sysfs operations"), MAC changes are called with the netdev lock
> held, so we should not wait with the lock held during reset or
> initialization. This allows the caller to retry or handle the busy state
> appropriately without blocking other operations.
that makes sense, but that could break user scripts, OTOH, with netdev
lock taken here, user could be blocked forever, so I think this is a net
positive change,
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
>
> drivers/net/ethernet/intel/iavf/iavf_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index dad001abc908..67aa14350b1b 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -1060,6 +1060,9 @@ static int iavf_set_mac(struct net_device *netdev, void *p)
> struct sockaddr *addr = p;
> int ret;
>
> + if (iavf_is_reset_in_progress(adapter) || adapter->state < __IAVF_DOWN)
> + return -EBUSY;
> +
> if (!is_valid_ether_addr(addr->sa_data))
> return -EADDRNOTAVAIL;
>
next prev parent reply other threads:[~2026-04-17 14:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 11:00 [PATCH net v3 0/5] Fix i40e/ice/iavf VF bonding after netdev lock changes Jose Ignacio Tornos Martinez
2026-04-14 11:00 ` [PATCH net v3 1/5] iavf: return EBUSY if reset in progress or not ready during MAC change Jose Ignacio Tornos Martinez
2026-04-17 14:38 ` Przemek Kitszel [this message]
2026-04-14 11:00 ` [PATCH net v3 2/5] i40e: skip unnecessary VF reset when setting trust Jose Ignacio Tornos Martinez
2026-04-14 11:41 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-04-16 15:31 ` Simon Horman
2026-04-14 11:00 ` [PATCH net v3 3/5] iavf: send MAC change request synchronously Jose Ignacio Tornos Martinez
2026-04-17 9:31 ` Simon Horman
2026-04-17 13:05 ` Przemek Kitszel
2026-04-14 11:00 ` [PATCH net v3 4/5] ice: skip unnecessary VF reset when setting trust Jose Ignacio Tornos Martinez
2026-04-16 13:55 ` Simon Horman
2026-04-14 11:00 ` [PATCH net v3 5/5] iavf: refactor virtchnl polling into single function Jose Ignacio Tornos Martinez
2026-04-14 11:43 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-04-16 5:51 ` Jose Ignacio Tornos Martinez
2026-04-16 23:09 ` Jacob Keller
2026-04-17 10:30 ` Jose Ignacio Tornos Martinez
2026-04-17 11:45 ` Simon Horman
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=dd884d10-1a7e-4227-baaa-afa8b4b264ce@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jtornosm@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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