Skip to contentSkip to conversation

net/iavf: fix wrong RSS hash update

PATCH Applied Wenjun Wu 2 participants 2 messages Mar 15, 2021 – Mar 24, 2021 1 message not in the archive Network drivers

lore
Share & tools
lore

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

Wenjun Wu

author
#1 lore raw

PATCH v4 1/1 net/iavf: fix wrong RSS hash update

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

Fixes 95f2f0e9fc2a ("net/iavf: improve default RSS")

---
v4: clear existing RSS when rss_hf = 0.
v3: fix the same issue for both pf and vf.

---
 drivers/net/iavf/iavf_ethdev.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_ethdev.c +10 -1
index 4d3772202..8610efba6 100644
@@ -1250,8 +1250,17 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (ret)
 		return ret;
 
-	if (rss_conf->rss_hf == 0)
+	if (rss_conf->rss_hf == 0) {
+		vf->rss_hf = 0;
+		ret = iavf_set_hena(adapter, 0);
+
+		/* It is a workaround, temporarily allow error to be returned
+		 * due to possible lack of PF handling for hena = 0.
+		 */
+		if (ret)
+			PMD_DRV_LOG(WARNING, "fail to clean existing RSS, lack PF support");
 		return 0;
+	}
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) {
 		/* Clear existing RSS. */
Signature · 1 line
2.25.1
Applied
#2 lore raw
Quoted 4 lines · Wenjun Wu

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

Quoted 8 lines
Fixes 95f2f0e9fc2a ("net/iavf: improve default RSS")

---
v4: clear existing RSS when rss_hf = 0.
v3: fix the same issue for both pf and vf.

Applied to dpdk-next-net-intel.