patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Shani Peretz <shperetz@nvidia.com>
To: <stable@dpdk.org>
Cc: <ktraynor@redhat.com>, Shani Peretz <shperetz@nvidia.com>,
	<huangdengdui@huawei.com>, Jie Hai <haijie1@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>
Subject: [PATCH 23.11] net/hns3: fix atomic API usage for LTS compatibility
Date: Tue, 16 Dec 2025 13:54:28 +0200	[thread overview]
Message-ID: <20251216115428.77515-1-shperetz@nvidia.com> (raw)

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;
 	}
-- 
2.43.0


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 11:54 Shani Peretz [this message]
2025-12-16 12:54 ` Kevin Traynor

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=20251216115428.77515-1-shperetz@nvidia.com \
    --to=shperetz@nvidia.com \
    --cc=haijie1@huawei.com \
    --cc=huangdengdui@huawei.com \
    --cc=ktraynor@redhat.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).