patch 'net/hns3: fix resources release on reset' has been queued to stable release 23.11.5

Xueming Li xuemingl at nvidia.com
Thu Jun 26 14:01:00 CEST 2025


Hi,

FYI, your patch has been queued to stable release 23.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=280d641cf8d867695326342bed4145c615d52912

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 280d641cf8d867695326342bed4145c615d52912 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui at huawei.com>
Date: Tue, 8 Apr 2025 16:31:00 +0800
Subject: [PATCH] net/hns3: fix resources release on reset
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]

Some resources, like, unmapping Rx interrupt, doesn't perform
when execute dev_stop on reset. This will lead to other issues.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 541f086443..99566375ea 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5219,20 +5219,23 @@ 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) {
+		hns3_warn(hw, "device is resetting, stop operation is not allowed.");
+		return -EBUSY;
+	}
+
 	dev->data->dev_started = 0;
 
 	hw->adapter_state = HNS3_NIC_STOPPING;
 	hns3_stop_rxtx_datapath(dev);
 
 	rte_spinlock_lock(&hw->lock);
-	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-		hns3_tm_dev_stop_proc(hw);
-		hns3_config_mac_tnl_int(hw, false);
-		hns3_stop_tqps(hw);
-		hns3_do_stop(hns);
-		hns3_unmap_rx_interrupt(dev);
-		hw->adapter_state = HNS3_NIC_CONFIGURED;
-	}
+	hns3_tm_dev_stop_proc(hw);
+	hns3_config_mac_tnl_int(hw, false);
+	hns3_stop_tqps(hw);
+	hns3_do_stop(hns);
+	hns3_unmap_rx_interrupt(dev);
+	hw->adapter_state = HNS3_NIC_CONFIGURED;
 	hns3_rx_scattered_reset(dev);
 	rte_eal_alarm_cancel(hns3_service_handler, dev);
 	hns3_stop_report_lse(dev);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-26 19:59:19.444092958 +0800
+++ 0040-net-hns3-fix-resources-release-on-reset.patch	2025-06-26 19:59:17.374418044 +0800
@@ -1 +1 @@
-From 361eab82df67c09cb84a9e2e66c0d93a84be610d Mon Sep 17 00:00:00 2001
+From 280d641cf8d867695326342bed4145c615d52912 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -18 +20 @@
-index 2d4e348442..9f99525e70 100644
+index 541f086443..99566375ea 100644
@@ -36 +38 @@
--	if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) == 0) {
+-	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {


More information about the stable mailing list