patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Shani Peretz <shperetz@nvidia.com>, stable@dpdk.org
Cc: huangdengdui@huawei.com, Jie Hai <haijie1@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>
Subject: Re: [PATCH 23.11] net/hns3: fix atomic API usage for LTS compatibility
Date: Tue, 16 Dec 2025 12:54:48 +0000	[thread overview]
Message-ID: <e009bb82-4c19-4a06-95c9-3e496906ed17@redhat.com> (raw)
In-Reply-To: <20251216115428.77515-1-shperetz@nvidia.com>

On 16/12/2025 11:54, Shani Peretz wrote:
> The rte_atomic_load_explicit() API requires the variable to be
> declared with RTE_ATOMIC() type. However, hw->reset.resetting is
> declared as plain uint16_t, causing a compilation error with clang.
> 
> Revert to using __atomic_load_n() which is consistent with all other
> atomic operations on the resetting field in this driver.
> 
> Fixes: 280d641cf8d8 ("net/hns3: fix resources release on reset")
> Cc: huangdengdui@huawei.com
> 
> Signed-off-by: Shani Peretz <shperetz@nvidia.com>
> ---
>  drivers/net/hns3/hns3_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
> index c82d7d84cb..c20a65ca8e 100644
> --- a/drivers/net/hns3/hns3_ethdev.c
> +++ b/drivers/net/hns3/hns3_ethdev.c
> @@ -5230,7 +5230,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
>  	struct hns3_hw *hw = &hns->hw;
>  
>  	PMD_INIT_FUNC_TRACE();
> -	if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) != 0) {
> +	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) != 0) {
>  		hns3_warn(hw, "device is resetting, stop operation is not allowed.");
>  		return -EBUSY;
>  	}

Acked-by: Kevin Traynor <ktraynor@redhat.com>


      reply	other threads:[~2025-12-16 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 11:54 Shani Peretz
2025-12-16 12:54 ` Kevin Traynor [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=e009bb82-4c19-4a06-95c9-3e496906ed17@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=haijie1@huawei.com \
    --cc=huangdengdui@huawei.com \
    --cc=shperetz@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=yisen.zhuang@huawei.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).