patch 'net/hns3: remove unnecessary RSS switch' has been queued to stable release 20.11.6
Xueming Li
xuemingl at nvidia.com
Tue Jun 21 10:01:46 CEST 2022
Hi,
FYI, your patch has been queued to stable release 20.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 06/23/22. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c72194a754339c9ce03b1ee109c48c19f63d8f06
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Wed, 6 Apr 2022 14:57:01 +0800
Subject: [PATCH] net/hns3: remove unnecessary RSS switch
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]
Whether the RSS is enabled depends on RTE_ETH_MQ_RX_RSS_FLAG and packet
tuple are enabled. So the RSS switch is unnecessary.
Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")
Fixes: fd8196838763 ("net/hns3: fix configuring device with RSS enabled")
Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 --
drivers/net/hns3/hns3_ethdev.h | 1 -
drivers/net/hns3/hns3_ethdev_vf.c | 2 --
drivers/net/hns3/hns3_flow.c | 1 -
drivers/net/hns3/hns3_rss.c | 3 ---
5 files changed, 9 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8a19a77f81..ee436ff5ec 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2394,7 +2394,6 @@ 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;
@@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
hw->mac.media_type = cfg.media_type;
hw->rss_size_max = cfg.rss_size_max;
- hw->rss_dis_flag = false;
memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
hw->mac.phy_addr = cfg.phy_addr;
hw->num_tx_desc = cfg.tqp_desc_num;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 5717f54441..de0084c352 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -450,7 +450,6 @@ struct hns3_hw {
/* The configuration info of RSS */
struct hns3_rss_conf rss_info;
- bool rss_dis_flag; /* disable rss flag. true: disable, false: enable */
uint16_t rss_ind_tbl_size;
uint16_t rss_key_size;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b0db01993b..c1cf7a8c60 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -816,7 +816,6 @@ 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;
@@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
int ret;
hw->mac.media_type = HNS3_MEDIA_TYPE_NONE;
- hw->rss_dis_flag = false;
/* Get device capability */
ret = hns3vf_get_capability(hw);
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 3fbaa5f1c5..3d30070ee3 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw)
ret = hns3_set_rss_tuple_by_rss_hf(hw, 0);
if (ret)
return ret;
- hw->rss_dis_flag = true;
return 0;
}
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index e38de80eec..50c4f21da3 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -381,9 +381,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
uint8_t *key = rss_conf->rss_key;
int ret;
- if (hw->rss_dis_flag)
- return -EINVAL;
-
if (key && key_len != HNS3_RSS_KEY_SIZE) {
hns3_err(hw, "the hash key len(%u) is invalid, must be %u",
key_len, HNS3_RSS_KEY_SIZE);
--
2.35.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-06-21 15:37:51.135612187 +0800
+++ 0040-net-hns3-remove-unnecessary-RSS-switch.patch 2022-06-21 15:37:49.034451240 +0800
@@ -1 +1 @@
-From ec1691494273ef4f9cb60ed24099196de1ce0cc4 Mon Sep 17 00:00:00 2001
+From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 4d5a595aab..0b565a5614 100644
+index 8a19a77f81..ee436ff5ec 100644
@@ -27,3 +29,3 @@
-@@ -2018,7 +2018,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
- if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+@@ -2394,7 +2394,6 @@ 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;
@@ -32,4 +34,4 @@
- ret = hns3_dev_rss_hash_update(dev, &rss_conf);
- if (ret)
- goto cfg_err;
-@@ -2824,7 +2823,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+ if (rss_conf.rss_key == NULL) {
+ rss_conf.rss_key = rss_cfg->key;
+ rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
+@@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
@@ -42 +44 @@
- hw->dcb_info.num_pg = 1;
+ hw->num_tx_desc = cfg.tqp_desc_num;
@@ -44 +46 @@
-index bb6ddd97ba..5e8a746514 100644
+index 5717f54441..de0084c352 100644
@@ -47 +49 @@
-@@ -526,7 +526,6 @@ struct hns3_hw {
+@@ -450,7 +450,6 @@ struct hns3_hw {
@@ -56 +58 @@
-index f641e0dc36..589de0ab3a 100644
+index b0db01993b..c1cf7a8c60 100644
@@ -59 +61 @@
-@@ -495,7 +495,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -816,7 +816,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -61,2 +63,2 @@
- if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -65,3 +67,3 @@
- ret = hns3_dev_rss_hash_update(dev, &rss_conf);
- if (ret)
-@@ -997,7 +996,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
+ if (rss_conf.rss_key == NULL) {
+ rss_conf.rss_key = rss_cfg->key;
+@@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw)
@@ -76 +78 @@
-index 317f91fc71..86ebbf69b6 100644
+index 3fbaa5f1c5..3d30070ee3 100644
@@ -79 +81 @@
-@@ -1449,7 +1449,6 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -88 +90 @@
-index e149c16bfe..d376486a1d 100644
+index e38de80eec..50c4f21da3 100644
More information about the stable
mailing list