patches for DPDK stable branches
 help / color / mirror / Atom feed
From: rongwei liu <rongweil@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, matan@nvidia.com, viacheslavo@nvidia.com,
	orika@nvidia.com,  suanmingm@nvidia.com, thomas@monjalon.net,
	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 12:49:46 +0800	[thread overview]
Message-ID: <e30c6a96-d536-4454-b7b2-c98c4a24a3e4@nvidia.com> (raw)
In-Reply-To: <20250827214044.16f9baaa@hermes.local>



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.

  reply	other threads:[~2025-08-28  4:49 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 [this message]
2025-08-28 13:37     ` Thomas Monjalon

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=e30c6a96-d536-4454-b7b2-c98c4a24a3e4@nvidia.com \
    --to=rongweil@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --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).