[dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:59 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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 ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei at huawei.com>
Date: Tue, 22 Sep 2020 20:03:28 +0800
Subject: [PATCH] net/hns3: fix configuring device with RSS enabled

[ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ]

Currently, when running the following commands in the CLI of testpmd
application, the driver reports an -EINVAL error when performing the No.3
step.
1) flow create 0 ingress pattern end actions rss key <key> func simple_xor
     types all end / end
2) flow flush 0
3) port config dcb vt off pfc off

The root cause as below:
In the No.2 step, when RSS rules is flushed, we set the the flag
hw->rss_dis_flag with true to indicate RSS id disabled. And in the No.3
step, calling rte_eth_dev_configure API function, the internal function
named hns3_dev_rss_hash_update check hw->rss_dis_flag is true and return
-EINVAL.

When user calls the rte_eth_dev_configure API function with the input
parameter dev_conf->rxmode.mq_mode having ETH_MQ_RX_RSS_FLAG to enable RSS,
driver should set internal flag hw->rss_dis_flag with false to indicate RSS
is enabled in the '.dev_configure' ops implementation function named
hns3_dev_configure and hns3vf_dev_configure.

Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 76f163d129..af43a4473c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
+		hw->rss_dis_flag = false;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
 			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 37c7d33f59..87558832b2 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+		hw->rss_dis_flag = false;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.256054739 +0000
+++ 0080-net-hns3-fix-configuring-device-with-RSS-enabled.patch	2020-10-28 10:35:11.596831378 +0000
@@ -1,8 +1,10 @@
-From fd81968387634571845e879e7b5d64c5cfa8880d Mon Sep 17 00:00:00 2001
+From ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei at huawei.com>
 Date: Tue, 22 Sep 2020 20:03:28 +0800
 Subject: [PATCH] net/hns3: fix configuring device with RSS enabled
 
+[ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ]
+
 Currently, when running the following commands in the CLI of testpmd
 application, the driver reports an -EINVAL error when performing the No.3
 step.
@@ -25,7 +27,6 @@
 hns3_dev_configure and hns3vf_dev_configure.
 
 Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")
-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>
@@ -35,10 +36,10 @@
  2 files changed, 2 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 10cfc5d47d..99bcc7a9a4 100644
+index 76f163d129..af43a4473c 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2326,6 +2326,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
  		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
  		rss_conf = conf->rx_adv_conf.rss_conf;
@@ -47,10 +48,10 @@
  			rss_conf.rss_key = rss_cfg->key;
  			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index cb2747b132..4c73441116 100644
+index 37c7d33f59..87558832b2 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -783,6 +783,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
  	/* When RSS is not configured, redirect the packet queue 0 */
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
  		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;


More information about the stable mailing list