patch 'net/hns3: remove useless code when destroy valid RSS rule' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:10 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 03/01/23. 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=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=2e99d819d3a0890c9bb718f06891c6d8d080758c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 2e99d819d3a0890c9bb718f06891c6d8d080758c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Tue, 31 Jan 2023 21:02:57 +0800
Subject: [PATCH] net/hns3: remove useless code when destroy valid RSS rule
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]

When all rules are flushed the hw::rss_info::conf::func set to
RTE_ETH_HASH_FUNCTION_MAX and hw::rss_info::conf::queue set to NULL
which indicates no flow rules is issued.
See: commit eb158fc756a5 ("net/hns3: fix config when creating RSS rule
after flush").

Actually, the way determining whether there are rules has been changed
by walking the flow RSS list.
See: commit 705a50800334 ("net/hns3: fix RSS filter restore").

In addition, the rte_flow_action_rss from user isn't saved to 'conf' in
hw->rss_info now. So this code can be removed.

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

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 303275ae93..7adde16cbc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1279,19 +1279,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 	bool rss_key_is_same;
 	bool func_is_same;

-	/*
-	 * When user flush all RSS rule, RSS func is set invalid with
-	 * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
-	 * flushed, any validate RSS func is different with it before
-	 * flushed. Others, when user create an action RSS with RSS func
-	 * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
-	 * between continuous RSS flow.
-	 */
-	if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
-		func_is_same = false;
-	else
-		func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
-				(comp->func == with->func) : true;
+	func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
+			(comp->func == with->func) : true;

 	if (with->key_len == 0 || with->key == NULL)
 		rss_key_is_same = 1;
@@ -1533,7 +1522,6 @@ static int
 hns3_config_rss_filter(struct hns3_hw *hw,
 		       const struct hns3_rss_conf *conf, bool add)
 {
-	struct hns3_rss_conf *rss_info;
 	uint64_t flow_types;
 	uint16_t num;
 	int ret;
@@ -1560,7 +1548,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;

-	rss_info = &hw->rss_info;
 	if (!add) {
 		if (!conf->valid)
 			return 0;
@@ -1571,15 +1558,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 			return ret;
 		}

-		if (rss_flow_conf.queue_num) {
-			/*
-			 * Due the content of queue pointer have been reset to
-			 * 0, the rss_info->conf.queue should be set to NULL
-			 */
-			rss_info->conf.queue = NULL;
-			rss_info->conf.queue_num = 0;
-		}
-
 		return 0;
 	}

--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:44.186903300 +0800
+++ 0103-net-hns3-remove-useless-code-when-destroy-valid-RSS-.patch	2023-02-27 14:08:40.849237000 +0800
@@ -1 +1 @@
-From 546031ba551485c3e3aa57c3698975c2852cbef1 Mon Sep 17 00:00:00 2001
+From 2e99d819d3a0890c9bb718f06891c6d8d080758c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]
@@ -21 +23,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index 4cca675c53..3809fcc2d7 100644
+index 303275ae93..7adde16cbc 100644


More information about the stable mailing list