[dpdk-stable] patch 'net/hns3: fix configure FEC when concurrent with reset' has been queued to stable release 20.11.2
Xueming Li
xuemingl at nvidia.com
Mon May 10 18:02:10 CEST 2021
Hi,
FYI, your patch has been queued to stable release 20.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/41111ae6237945405a1d8689eafc8e54cd815461
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang at huawei.com>
Date: Sat, 10 Apr 2021 09:11:20 +0800
Subject: [PATCH] net/hns3: fix configure FEC when concurrent with reset
Cc: Luca Boccassi <bluca at debian.org>
[ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ]
Currently, after the reset is complete, the PMD restores the FEC
according to the FEC configuration reserved in the driver. If there is a
concurrency between the FEC setup operation and the restore operation
after a reset, the FEC status of the last hardware may be unknown.
This patch adds the step of obtaining the lock when setting the FEC to
avoid concurrency between restore operation and setting operation.
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Signed-off-by: Chengchang Tang <tangchengchang at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b90ee642d6..023b7d6912 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
return -EINVAL;
}
+ rte_spinlock_lock(&hw->lock);
ret = hns3_set_fec_hw(hw, mode);
- if (ret)
+ if (ret) {
+ rte_spinlock_unlock(&hw->lock);
return ret;
+ }
pf->fec_mode = mode;
+ rte_spinlock_unlock(&hw->lock);
+
return 0;
}
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-05-10 23:59:31.260521800 +0800
+++ 0182-net-hns3-fix-configure-FEC-when-concurrent-with-rese.patch 2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 6d360284dffe51f852fc373058bfb274b9b8982c Mon Sep 17 00:00:00 2001
+From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 53a0b545ce..846e5a27c2 100644
+index b90ee642d6..023b7d6912 100644
@@ -27 +29 @@
-@@ -6433,11 +6433,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
More information about the stable
mailing list