[dpdk-stable] patch 'net/hns3: fix key length when configuring RSS' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:24 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Thanks.

Luca Boccassi

---
>From 8a1ae3e12667d43260a9546146d7d35c17884c58 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun at huawei.com>
Date: Fri, 22 May 2020 17:21:18 +0800
Subject: [PATCH] net/hns3: fix key length when configuring RSS

[ upstream commit 40783b1280e1833615885dc98f3c796ad5addb54 ]

When users set the length of RSS hash key greater than the supported
length by hardware, the driver should intercept and can not configure
the wrong key into the hardware.

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

Signed-off-by: Lijun Ou <oulijun at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 1b9dc1dae..7d5ba61c6 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1475,6 +1475,14 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
+	if (rss_flow_conf.key_len &&
+	    rss_flow_conf.key_len > RTE_DIM(rss_info->key)) {
+		hns3_err(hw,
+			"input hash key(%u) greater than supported len(%zu)",
+			rss_flow_conf.key_len, RTE_DIM(rss_info->key));
+		return -EINVAL;
+	}
+
 	/* Filter the unsupported flow types */
 	flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT;
 	if (flow_types != rss_flow_conf.types)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.836950551 +0100
+++ 0006-net-hns3-fix-key-length-when-configuring-RSS.patch	2020-07-24 12:53:48.155004000 +0100
@@ -1,14 +1,15 @@
-From 40783b1280e1833615885dc98f3c796ad5addb54 Mon Sep 17 00:00:00 2001
+From 8a1ae3e12667d43260a9546146d7d35c17884c58 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun at huawei.com>
 Date: Fri, 22 May 2020 17:21:18 +0800
 Subject: [PATCH] net/hns3: fix key length when configuring RSS
 
+[ upstream commit 40783b1280e1833615885dc98f3c796ad5addb54 ]
+
 When users set the length of RSS hash key greater than the supported
 length by hardware, the driver should intercept and can not configure
 the wrong key into the hardware.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable at dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun at huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
@@ -17,7 +18,7 @@
  1 file changed, 8 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index aef301a8a..c7851b235 100644
+index 1b9dc1dae..7d5ba61c6 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
 @@ -1475,6 +1475,14 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,


More information about the stable mailing list