Skip to contentSkip to conversation

net/ice: fix wrong RSS hash update

PATCH Superseded Wenjun Wu 2 participants 2 messages Mar 3, 2021 – Mar 4, 2021 1 message not in the archive Network drivers

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20210302053105.63783-1

Wenjun Wu

author
#1 lore raw

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

This patch change redundant judgment statements to disable RSS when users need to disable RSS or RSS hash function configured is not supported.

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

---
v2: do pf->rss_hf = 0 when rss_conf->rss_hf == 0 instead of direct removal to avoid unnecessary judgment.

---
 drivers/net/ice/ice_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ice/ice_ethdev.c +3 -1
index f43b2e0b2..299162286 100644
@@ -4461,8 +4461,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
+	if (rss_conf->rss_hf == 0) {
+		pf->rss_hf = 0;
 		return 0;
+	}
 
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
Signature · 1 line
2.25.1
Acked-by on v2 1/1
#2 lore raw
Quoted 41 lines

-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: 2021年3月3日 15:57
To: [email protected]; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Wu, Wenjun1 <[email protected]>; [email protected]
Subject: [PATCH v2] net/ice: fix wrong RSS hash update

This patch change redundant judgment statements to disable RSS when users need to disable RSS or RSS hash function configured is not supported.

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

---
v2: do pf->rss_hf = 0 when rss_conf->rss_hf == 0 instead of direct removal to avoid unnecessary judgment.

---
 drivers/net/ice/ice_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0 -0

f43b2e0b2..299162286 100644

drivers/net/ice/ice_ethdev.c +3 -2
@@ -4461,8 +4461,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
+	if (rss_conf->rss_hf == 0) {
+		pf->rss_hf = 0;
 		return 0;
+	}
 
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
--

2.25.1