patch 'net/hns3: move flow direction rule recovery' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:38 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1edc00899d3163b01ffefea8d658c79581aab9e3

Thanks.

Luca Boccassi

---
>From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Fri, 30 Sep 2022 15:22:06 +0800
Subject: [PATCH] net/hns3: move flow direction rule recovery

[ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ]

The 'hns3_restore_filter' is used to restore flow rules from
rte_flow API during the reset process. This patch moves the
recovery of flow direction rule to this function to improve
code maintainability.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 4 ----
 drivers/net/hns3/hns3_fdir.c   | 3 +++
 drivers/net/hns3/hns3_flow.c   | 7 +++++++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 7ae9456664..33b10539e0 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns)
 	if (ret)
 		goto err_promisc;
 
-	ret = hns3_restore_all_fdir_filter(hns);
-	if (ret)
-		goto err_promisc;
-
 	ret = hns3_restore_rx_interrupt(hw);
 	if (ret)
 		goto err_promisc;
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 4e1667d2f8..f210c8b1e4 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
 	bool err = false;
 	int ret;
 
+	if (hns->is_vf)
+		return 0;
+
 	/*
 	 * This API is called in the reset recovery process, the parent function
 	 * must hold hw->lock.
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index c71a22e6a6..ffdd131d15 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1652,6 +1652,13 @@ out:
 int
 hns3_restore_filter(struct rte_eth_dev *dev)
 {
+	struct hns3_adapter *hns = dev->data->dev_private;
+	int ret;
+
+	ret = hns3_restore_all_fdir_filter(hns);
+	if (ret != 0)
+		return ret;
+
 	return hns3_restore_rss_filter(dev);
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:30.199595860 +0000
+++ 0080-net-hns3-move-flow-direction-rule-recovery.patch	2022-11-03 09:27:25.529425461 +0000
@@ -1 +1 @@
-From 860ed8516afe49e61c537e19c1016f70b9a84fd2 Mon Sep 17 00:00:00 2001
+From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index b0f69589d9..15d622a900 100644
+index 7ae9456664..33b10539e0 100644
@@ -26 +27 @@
-@@ -5907,10 +5907,6 @@ hns3_restore_conf(struct hns3_adapter *hns)
+@@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns)
@@ -34 +35 @@
- 	ret = hns3_restore_ptp(hns);
+ 	ret = hns3_restore_rx_interrupt(hw);
@@ -38 +39 @@
-index 30e5e66772..48a91fb517 100644
+index 4e1667d2f8..f210c8b1e4 100644
@@ -41 +42 @@
-@@ -1068,6 +1068,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
@@ -52 +53 @@
-index 08fa6da7bb..dd61ecd2aa 100644
+index c71a22e6a6..ffdd131d15 100644
@@ -55 +56 @@
-@@ -1675,6 +1675,13 @@ out:
+@@ -1652,6 +1652,13 @@ out:


More information about the stable mailing list