[dpdk-stable] patch 'net/hns3: fix delay for waiting to stop Rx/Tx' has been queued to stable release 20.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 12 15:04:56 CEST 2021
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/badc3ae38ad45a79552d9f8dc97ec48ac414e5f8
Thanks.
Luca Boccassi
---
>From badc3ae38ad45a79552d9f8dc97ec48ac414e5f8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Sun, 13 Jun 2021 10:31:52 +0800
Subject: [PATCH] net/hns3: fix delay for waiting to stop Rx/Tx
[ upstream commit 4d8cce267840556cec8483c61f8cfbf25873496d ]
When the primary process executes dev_stop or is being reset, the packet
sending and receiving functions is changed. In this moment, the primary
process requests secondary processes to change their Rx/Tx functions, and
delays a period of time in case of crashes when queues are still in use.
The delay time depends on the number of queues actually used, instead of
the maximum number of queues supported by the device.
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")
Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 4 ++--
drivers/net/hns3/hns3_ethdev_vf.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 637e6134f9..249ab31040 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5169,7 +5169,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(dev);
/* Prevent crashes when queues are still in use. */
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (rte_atomic16_read(&hw->reset.resetting) == 0) {
@@ -5657,7 +5657,7 @@ hns3_stop_service(struct hns3_adapter *hns)
rte_wmb();
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(eth_dev);
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (hns->hw.adapter_state == HNS3_NIC_STARTED ||
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ed9dd9b3c3..5a9550d853 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1968,7 +1968,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(dev);
/* Prevent crashes when queues are still in use. */
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (rte_atomic16_read(&hw->reset.resetting) == 0) {
@@ -2411,7 +2411,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
rte_wmb();
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(eth_dev);
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (hw->adapter_state == HNS3_NIC_STARTED ||
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.833329750 +0100
+++ 0061-net-hns3-fix-delay-for-waiting-to-stop-Rx-Tx.patch 2021-07-12 13:41:36.510123027 +0100
@@ -1 +1 @@
-From 4d8cce267840556cec8483c61f8cfbf25873496d Mon Sep 17 00:00:00 2001
+From badc3ae38ad45a79552d9f8dc97ec48ac414e5f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d8cce267840556cec8483c61f8cfbf25873496d ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 20491305e7..dff265828e 100644
+index 637e6134f9..249ab31040 100644
@@ -27 +28 @@
-@@ -5895,7 +5895,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
+@@ -5169,7 +5169,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
@@ -35,2 +36,2 @@
- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-@@ -6511,7 +6511,7 @@ hns3_stop_service(struct hns3_adapter *hns)
+ if (rte_atomic16_read(&hw->reset.resetting) == 0) {
+@@ -5657,7 +5657,7 @@ hns3_stop_service(struct hns3_adapter *hns)
@@ -46 +47 @@
-index 41dd8ee129..7a5c162964 100644
+index ed9dd9b3c3..5a9550d853 100644
@@ -49 +50 @@
-@@ -2107,7 +2107,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
+@@ -1968,7 +1968,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
@@ -57,2 +58,2 @@
- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-@@ -2558,7 +2558,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
+ if (rte_atomic16_read(&hw->reset.resetting) == 0) {
+@@ -2411,7 +2411,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
More information about the stable
mailing list