patch 'net/hns3: save hash algo to RSS filter list node' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Mar 15 23:46:26 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

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/17/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/49069daba240878ef2f9830fa55b6a91c8dbd7b1

Thanks.

Luca Boccassi

---
>From 49069daba240878ef2f9830fa55b6a91c8dbd7b1 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Fri, 10 Mar 2023 17:35:14 +0800
Subject: [PATCH] net/hns3: save hash algo to RSS filter list node

[ upstream commit 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 ]

Save hash algo from rte flow RSS rule to RSS filter list node
instead of struct hns3_rss_conf.

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 15f3172cbb..40a202db20 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1407,7 +1407,7 @@ hns3_disable_rss(struct hns3_hw *hw)
 }
 
 static int
-hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
+hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_rss_conf *rss_conf,
 			 uint8_t *hash_algo)
 {
 	const uint8_t hash_func_map[] = {
@@ -1419,7 +1419,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
 	uint8_t key[HNS3_RSS_KEY_SIZE_MAX] = {0};
 	int ret;
 
-	if (func == RTE_ETH_HASH_FUNCTION_DEFAULT) {
+	if (rss_conf->conf.func == RTE_ETH_HASH_FUNCTION_DEFAULT) {
 		ret = hns3_rss_get_algo_key(hw, hash_algo, key,
 					    hw->rss_key_size);
 		if (ret != 0) {
@@ -1434,20 +1434,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
 		 * rte_flow_hash_algo) when this rule is delivered.
 		 */
 		if (__atomic_load_n((uint16_t *)&hw->reset.resetting, __ATOMIC_RELAXED) &&
-		    *hash_algo != hw->rss_info.rte_flow_hash_algo)
-			*hash_algo = hw->rss_info.rte_flow_hash_algo;
+		    *hash_algo != rss_conf->rte_flow_hash_algo)
+			*hash_algo = rss_conf->rte_flow_hash_algo;
 
 		return 0;
 	}
 
-	*hash_algo = hash_func_map[func];
+	*hash_algo = hash_func_map[rss_conf->conf.func];
 
 	return 0;
 }
 
 static int
-hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_rss_conf *conf)
 {
+	struct rte_flow_action_rss *rss_config = &conf->conf;
 	uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0};
 	bool use_default_key = false;
 	uint64_t flow_types;
@@ -1461,7 +1462,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 		use_default_key = true;
 	}
 
-	ret = hns3_parse_rss_algorithm(hw, rss_config->func, &hash_algo);
+	ret = hns3_parse_rss_algorithm(hw, conf, &hash_algo);
 	if (ret)
 		return ret;
 
@@ -1470,7 +1471,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 				    hw->rss_key_size);
 	if (ret)
 		return ret;
-	hw->rss_info.rte_flow_hash_algo = hash_algo;
+	conf->rte_flow_hash_algo = hash_algo;
 
 	/* Filter the unsupported flow types */
 	flow_types = rss_config->types ?
@@ -1547,7 +1548,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf)
 	}
 
 	/* Set hash algorithm and flow types by the user's config */
-	return hns3_hw_rss_hash_set(hw, rss_act);
+	return hns3_hw_rss_hash_set(hw, conf);
 }
 
 static int
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-03-15 22:44:51.635473740 +0000
+++ 0035-net-hns3-save-hash-algo-to-RSS-filter-list-node.patch	2023-03-15 22:44:49.655851770 +0000
@@ -1 +1 @@
-From 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 Mon Sep 17 00:00:00 2001
+From 49069daba240878ef2f9830fa55b6a91c8dbd7b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9d34b8a181bf022fe3a3a3ae8511f3d921fc5c67 ]
+
@@ -9,2 +10,0 @@
-Cc: stable at dpdk.org
-
@@ -18 +18 @@
-index 3700d073b1..527874df44 100644
+index 15f3172cbb..40a202db20 100644
@@ -21 +21 @@
-@@ -1439,7 +1439,7 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1407,7 +1407,7 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -30 +30 @@
-@@ -1451,7 +1451,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
+@@ -1419,7 +1419,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
@@ -39 +39 @@
-@@ -1466,20 +1466,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
+@@ -1434,20 +1434,21 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function func,
@@ -42 +42 @@
- 		if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) &&
+ 		if (__atomic_load_n((uint16_t *)&hw->reset.resetting, __ATOMIC_RELAXED) &&
@@ -65 +65 @@
-@@ -1493,7 +1494,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1461,7 +1462,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -74 +74 @@
-@@ -1502,7 +1503,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1470,7 +1471,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -83 +83 @@
-@@ -1579,7 +1580,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf)
+@@ -1547,7 +1548,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf)


More information about the stable mailing list