Skip to contentSkip to conversation

net/ice: fix wrong RSS hash update

PATCH Superseded Wenjun Wu 2 participants 3 messages Mar 2, 2021 – Mar 3, 2021 Network drivers

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Wenjun Wu

author
#0 lore raw

PATCH 1/1 net/ice: fix wrong RSS hash update

This patch removes redundant judgment statements to disable RSS when RSS hash function configured is not supported.

Fixes 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")
---
 drivers/net/ice/ice_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/ice/ice_ethdev.c +0 -3
index f43b2e0b2..a84b3d3c0 100644
@@ -4461,9 +4461,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
-		return 0;
-
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 26 lines

-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: Tuesday, March 2, 2021 13:31
To: [email protected]; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>; [email protected]
Subject: [PATCH v1] net/ice: fix wrong RSS hash update

This patch removes redundant judgment statements to disable RSS when RSS hash function configured is not supported.

Fixes 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")
---
 drivers/net/ice/ice_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0 -0

f43b2e0b2..a84b3d3c0 100644

drivers/net/ice/ice_ethdev.c ice_rss_hash_update(struct rte_eth_dev *dev, · line 4466

Quoted 6 lines
drivers/net/ice/ice_ethdev.c +0 -3
@@ -4461,9 +4461,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
-		return 0;
-

Why need to delete this code? It's a code clean to avoid to do more judgement in the next funxtion.

Quoted 5 lines
drivers/net/ice/ice_ethdev.c +0 -1
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
 
--

2.25.1

#2 lore raw

Hi Qiming,

There are two consequences if skipping the state rss_conf->rss_hf == 0.

1. The function " port config all rss none" means to disable RSS. When rss_conf->rss_hf == 0, the function will not take affect, which does not conform to the description in dpdk doc:
The none option is equivalent to the --disable-rss command-line option.

2. Some ptypes are not supported by CVL. When rss_conf->rss_hf == 0, users cannot predict the consequences when setting RSS with these unsupported ptypes. The RSS may be disabled, or with no change, which is not what we want to see.

So delete these codes may be better.

Regards,
Wenjun

-----Original Message-----
From: Yang, Qiming <[email protected]>
Sent: Wednesday, March 3, 2021 2:47 PM
To: Wu, Wenjun1 <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH v1] net/ice: fix wrong RSS hash update

Quoted 26 lines

-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: Tuesday, March 2, 2021 13:31
To: [email protected]; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>; [email protected]
Subject: [PATCH v1] net/ice: fix wrong RSS hash update

This patch removes redundant judgment statements to disable RSS when RSS hash function configured is not supported.

Fixes 4717a12cfaf1 ("net/ice: initialize and update RSS based on user

config")
Cc: [email protected]

---
 drivers/net/ice/ice_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
(quoted diff) +0 -0

b/drivers/net/ice/ice_ethdev.c index
f43b2e0b2..a84b3d3c0 100644

drivers/net/ice/ice_ethdev.c ice_rss_hash_update(struct rte_eth_dev *dev, · line 4466

Quoted 6 lines
drivers/net/ice/ice_ethdev.c +0 -3
@@ -4461,9 +4461,6 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
-		return 0;
-

Why need to delete this code? It's a code clean to avoid to do more judgement in the next funxtion.

Quoted 5 lines
drivers/net/ice/ice_ethdev.c +0 -1
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
 
--

2.25.1