patch 'net/hns3: fix RSS filter restore' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:35 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/5a9558f9eb0d4647661562d218309d5e038627b4

Thanks.

Luca Boccassi

---
>From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Fri, 30 Sep 2022 15:22:03 +0800
Subject: [PATCH] net/hns3: fix RSS filter restore

[ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ]

Currently, driver sets RSS function to 'RTE_ETH_HASH_FUNCTION_MAX'
when user flush all rules in order to judge whether driver needs
to restore RSS rules. In fact, all rules are saved in flow RSS list.
So there is no need to modify RSS function to this macro. And this
list can be used to restore. The modification of RSS function may
introduce new problem.

Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index c30a57d170..d1486175cc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 			rss_info->conf.queue_num = 0;
 		}
 
-		/* set RSS func invalid after flushed */
-		rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;
 		return 0;
 	}
 
@@ -1636,13 +1634,23 @@ int
 hns3_restore_rss_filter(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_rss_conf_ele *filter;
 	struct hns3_hw *hw = &hns->hw;
+	int ret = 0;
 
-	/* When user flush all rules, it doesn't need to restore RSS rule */
-	if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX)
-		return 0;
+	TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
+		if (!filter->filter_info.valid)
+			continue;
 
-	return hns3_config_rss_filter(dev, &hw->rss_info, true);
+		ret = hns3_config_rss_filter(dev, &filter->filter_info, true);
+		if (ret != 0) {
+			hns3_err(hw, "restore RSS filter failed, ret=%d", ret);
+			goto out;
+		}
+	}
+
+out:
+	return ret;
 }
 
 static int
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:30.018779798 +0000
+++ 0077-net-hns3-fix-RSS-filter-restore.patch	2022-11-03 09:27:25.517425228 +0000
@@ -1 +1 @@
-From 705a50800334de0681f181d679ba746df4b61be0 Mon Sep 17 00:00:00 2001
+From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 4952d807b8..2fb83f756a 100644
+index c30a57d170..d1486175cc 100644
@@ -26 +27 @@
-@@ -1587,8 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -35 +36 @@
-@@ -1659,13 +1657,23 @@ int
+@@ -1636,13 +1634,23 @@ int


More information about the stable mailing list