public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Gregory Etelson <getelson@nvidia.com>, dev@dpdk.org
Cc: mkashani@nvidia.com, stable@dpdk.org,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>, Rongwei Liu <rongweil@nvidia.com>,
	Alex Vesker <valex@nvidia.com>
Subject: Re: [PATCH] net/mlx5: fix SRH flex parser initialization synchronization
Date: Thu, 5 Feb 2026 14:05:44 +0200	[thread overview]
Message-ID: <515ab846-3a96-4d4f-b8cc-b1a047208fe5@nvidia.com> (raw)
In-Reply-To: <20251225162049.648482-1-getelson@nvidia.com>

Hi,


On 25/12/2025 6:20 PM, Gregory Etelson wrote:
> When multiple threads attempt to create the SRH flex parser
> simultaneously, only the first thread (T[0]) can proceed to the
> initialization code.
> Before doing so, T[0] increases the SRH flex parser reference counter.
> Other threads (T[i]) entering the SRH creation function also increase
> the reference counter before returning a successful code to their
> respective caller functions (CF[i]).
> 
> This can lead to three issues:
> 1. CF[i] may receive a successful return code from the SRH flex parser
> creation function before T[0] completes the parser construction.
> 2. If T[0] fails to create the SRH flex parser, CF[i] will not be
> aware and will assume the parser is valid.
> 3. If T[0] fails, it will not update the SRH flex parser reference
> counter.
> 
> The patch addresses these issues by locking the SRH flex parser node
> creation attempt.
> 
> The first thread to enter the locked section will proceed with the
> node creation.
> If successful, T[0] increases the node reference counter and removes
> the lock.
> If it fails, T[0] removes the lock and returns an error.
> 
> For other threads (T[i]) that obtain the lock, if the flex parser node
> reference count is non-zero, the node has already been created.
> These threads will then increase the reference counter and return
> success.
> Otherwise, they will behave like T[0].
> 
> Fixes: 00e579166cc0 ("net/mlx5: support IPv6 routing extension matching")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh


  reply	other threads:[~2026-02-05 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-25 16:20 [PATCH] net/mlx5: fix SRH flex parser initialization synchronization Gregory Etelson
2026-02-05 12:05 ` Raslan Darawsheh [this message]
2026-02-05 15:58 ` Raslan Darawsheh

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=515ab846-3a96-4d4f-b8cc-b1a047208fe5@nvidia.com \
    --to=rasland@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=mkashani@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rongweil@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --cc=valex@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