[PATCH 23.11] net/hns3: fix atomic API usage for LTS compatibility
Shani Peretz
shperetz at nvidia.com
Tue Dec 16 12:54:28 CET 2025
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 at huawei.com
Signed-off-by: Shani Peretz <shperetz at 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
More information about the stable
mailing list