From: Thomas Monjalon <thomas@monjalon.net>
To: rongwei liu <rongweil@nvidia.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
dev@dpdk.org, matan@nvidia.com, viacheslavo@nvidia.com,
orika@nvidia.com, suanmingm@nvidia.com, stable@dpdk.org,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Bing Zhao <bingz@nvidia.com>
Subject: Re: [PATCH v1] net/mlx5: fix probe optimization race condition
Date: Thu, 28 Aug 2025 15:37:59 +0200 [thread overview]
Message-ID: <23111985.hxa6pUQ8Du@thomas> (raw)
In-Reply-To: <e30c6a96-d536-4454-b7b2-c98c4a24a3e4@nvidia.com>
28/08/2025 06:49, rongwei liu:
>
> On 2025/8/28 12:40, Stephen Hemminger wrote:
> > On Thu, 28 Aug 2025 06:21:34 +0300
> > Rongwei Liu <rongweil@nvidia.com> wrote:
> >
> >> With dedicated RDMA link monitor, there are two threads
> >> which can update the IB device port information.
> >>
> >> Add a new flag to avoid the race condition. Update should
> >> go through RDMA link monitor once ready.
> >>
> >> Fixes: 51fb5c40c826 ("net/mlx5: optimize device probing")
> >> Cc: rongweil@nvidia.com
> >> Cc: stable@dpdk.org
> >> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> >> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> >> ---
> >
> > If variable is modified (with out locking) on two threads it
> > needs to atomic or volatile.
> Exactly. Before this patch, it' user responsebility to seperate probe probing and sf manipualtion.
> Obviously, customer didn't follow this very well.
> Now logic change to:
> 1. Update all port information in probing thread.
> 2. Probe thread initiate the dedicated rdma monitor thread. Once ready, all port update will go to this thread.
> 3. Next port probing won't trigger PMD port information update.
>
> No lock is required then.
This is the kind of info we need in a commit log.
Please make a v2, thanks.
prev parent reply other threads:[~2025-08-28 13:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 3:21 Rongwei Liu
2025-08-28 4:40 ` Stephen Hemminger
2025-08-28 4:49 ` rongwei liu
2025-08-28 13:37 ` Thomas Monjalon [this message]
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=23111985.hxa6pUQ8Du@thomas \
--to=thomas@monjalon.net \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rongweil@nvidia.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.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;
as well as URLs for NNTP newsgroup(s).