From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Ciara Loftus <ciara.loftus@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH] net/iavf: fix reset race condition
Date: Fri, 25 Sep 2026 12:46:16 +0200 [thread overview]
Message-ID: <3048d3a5-c148-4ad9-afb6-9e334a53cd4f@intel.com> (raw)
In-Reply-To: <20260924084152.11089-1-ciara.loftus@intel.com>
On 9/24/2026 10:41 AM, Ciara Loftus wrote:
> iavf_handle_hw_reset() can be called concurrently from the iavf-event
> thread handling RTE_ETH_EVENT_INTR_RESET and from any thread calling
> rte_pmd_iavf_reinit() (VF-initiated reset), with no synchronisation
> between the two. Make in_reset_recovery atomic and use it as a guard
> so only one reset runs at a time.
>
> Fixes: 28a1a72eac26 ("net/iavf: add VF initiated reset")
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
There's an AI review comment about a potential stale in_reset_recovery
state when init/uninit fails in certain cases. I've taken the liberty to
check this against the code, and it seems to be a false positive.
My own AI review flagged the following:
```
iavf_ethdev.c:3747: after observing false, this function reads
start_pending, dev_started, link_up that the reset thread wrote before
its release-store. A relaxed load does not formally synchronize with
that release, so on weakly-ordered CPUs those reads could be stale. Use
rte_memory_order_acquire here.
iavf_ethdev.c:3547-3548: vf->pf_reset_in_progress = false is written
after the release-store, so it is not covered by it. A concurrent
dev_close() on another thread that sees the flag cleared could still see
pf_reset_in_progress == true and skip iavf_vf_reset()/flow flush. Swap
the two lines.
```
However, if we're running two dev_close() calls concurrently we've got
way bigger problems so I don't think the second finding is meaningful.
The first one may be a "correctness" issue but not blocking either.
So, LGTM (with or without the above suggested fixed)
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
next prev parent reply other threads:[~2026-09-25 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 8:41 [PATCH] net/iavf: fix reset race condition Ciara Loftus
2026-09-25 10:46 ` Burakov, Anatoly [this message]
2026-09-28 9:53 ` [PATCH v2] " Ciara Loftus
2026-09-29 10:25 ` Bruce Richardson
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=3048d3a5-c148-4ad9-afb6-9e334a53cd4f@intel.com \
--to=anatoly.burakov@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.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