patch 'net/hns3: use RSS filter list to check duplicated rule' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:47 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 02/25/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/1ec2d6e14c158c7148691362ca77aba8f4160705

Thanks.

Luca Boccassi

---
>From 1ec2d6e14c158c7148691362ca77aba8f4160705 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Tue, 31 Jan 2023 21:02:56 +0800
Subject: [PATCH] net/hns3: use RSS filter list to check duplicated rule

[ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ]

All rules from user are saved in RSS filter list, so use RSS
filter list to check duplicated rule.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 67379d5bbb..0e0cf418ee 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1279,7 +1279,7 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 		!memcmp(comp->key, with->key, with->key_len);
 
 	return (func_is_same && rss_key_is_same &&
-		comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
+		comp->types == with->types &&
 		comp->level == with->level &&
 		comp->queue_num == with->queue_num &&
 		!memcmp(comp->queue, with->queue,
@@ -1564,15 +1564,7 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 	}
 
 	/* Set hash algorithm and flow types by the user's config */
-	ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf);
-	if (ret)
-		return ret;
-
-	ret = hns3_rss_conf_copy(rss_info, &rss_flow_conf);
-	if (ret)
-		hns3_err(hw, "RSS config init fail(%d)", ret);
-
-	return ret;
+	return hns3_hw_rss_hash_set(hw, &rss_flow_conf);
 }
 
 static int
@@ -1645,17 +1637,32 @@ hns3_restore_filter(struct hns3_adapter *hns)
 	return hns3_restore_rss_filter(hw);
 }
 
+static bool
+hns3_rss_action_is_dup(struct hns3_hw *hw,
+		       const struct rte_flow_action_rss *act)
+{
+	struct hns3_rss_conf_ele *filter;
+
+	TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
+		if (!filter->filter_info.valid)
+			continue;
+
+		if (hns3_action_rss_same(&filter->filter_info.conf, act))
+			return true;
+	}
+
+	return false;
+}
+
 static int
 hns3_flow_parse_rss(struct rte_eth_dev *dev,
 		    const struct hns3_rss_conf *conf, bool add)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	bool ret;
 
-	ret = hns3_action_rss_same(&hw->rss_info.conf, &conf->conf);
-	if (ret) {
-		hns3_err(hw, "Enter duplicate RSS configuration : %d", ret);
+	if (hns3_rss_action_is_dup(hw, &conf->conf)) {
+		hns3_err(hw, "duplicate RSS configuration");
 		return -EINVAL;
 	}
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:29.956546584 +0000
+++ 0043-net-hns3-use-RSS-filter-list-to-check-duplicated-rul.patch	2023-02-23 09:36:28.270170750 +0000
@@ -1 +1 @@
-From 6afde23d843ecf67453eaf69924bd79873f6f207 Mon Sep 17 00:00:00 2001
+From 1ec2d6e14c158c7148691362ca77aba8f4160705 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 5711757684..4cca675c53 100644
+index 67379d5bbb..0e0cf418ee 100644
@@ -22 +23 @@
-@@ -1300,7 +1300,7 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1279,7 +1279,7 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -31 +32 @@
-@@ -1596,15 +1596,7 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1564,15 +1564,7 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -48 +49 @@
-@@ -1676,17 +1668,32 @@ hns3_restore_filter(struct hns3_adapter *hns)
+@@ -1645,17 +1637,32 @@ hns3_restore_filter(struct hns3_adapter *hns)


More information about the stable mailing list