Skip to contentSkip to conversation

net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

PATCH Superseded Xuan Ding 2 participants 5 messages Jan 18, 2021 – Jan 19, 2021 Network drivers

lore
Share & tools
lore

Xuan Ding

author
#0 lore raw

PATCH 1/1 net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena = 0. Add warning that PF doesnot support hena = 0 now.

Fixes 95f2f0e9fc2a6("net/iavf: improve default RSS")
---
 drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_ethdev.c +13 -7
index e22c62ed00..46857875ea 100644
@@ -1250,11 +1250,15 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (rss_conf->rss_hf == 0)
 		return 0;
 
-	/* Overwritten default RSS. */
+	/* Clear existing RSS. */
 	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(ERR, "%s Remove rss vsi fail %d",
-			    __func__, ret);
+		PMD_DRV_LOG(WARNING, "fail to clean existing RSS,"
+			    "lack PF support");
 
 	/* Set new RSS configuration. */
 	ret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);
@@ -2174,10 +2178,12 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Set hena = 0 to ask PF to cleanup all existing RSS. */
 	ret = iavf_set_hena(adapter, 0);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "fail to disable default PF RSS");
-		return ret;
-	}
+	if (ret)
+		/* It is a workaround, temporarily allow error to be returned
+		 * due to possible lack of PF handling for hena = 0.
+		 */
+		PMD_DRV_LOG(WARNING, "fail to disable default RSS,"
+			    "lack PF support");
 
 	return 0;
 }
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/1 net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena = 0. Add warning that PF does not support hena = 0 now.

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

---

v2:
* Modify the commit log to avoid a spelling error.

---
 drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_ethdev.c +13 -7
index e22c62ed00..46857875ea 100644
@@ -1250,11 +1250,15 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (rss_conf->rss_hf == 0)
 		return 0;
 
-	/* Overwritten default RSS. */
+	/* Clear existing RSS. */
 	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(ERR, "%s Remove rss vsi fail %d",
-			    __func__, ret);
+		PMD_DRV_LOG(WARNING, "fail to clean existing RSS,"
+			    "lack PF support");
 
 	/* Set new RSS configuration. */
 	ret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);
@@ -2174,10 +2178,12 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Set hena = 0 to ask PF to cleanup all existing RSS. */
 	ret = iavf_set_hena(adapter, 0);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "fail to disable default PF RSS");
-		return ret;
-	}
+	if (ret)
+		/* It is a workaround, temporarily allow error to be returned
+		 * due to possible lack of PF handling for hena = 0.
+		 */
+		PMD_DRV_LOG(WARNING, "fail to disable default RSS,"
+			    "lack PF support");
 
 	return 0;
 }
Signature · 1 line
2.17.1
Applied
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Monday, January 18, 2021 4:28 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ding, Xuan <[email protected]>; [email protected]
Subject: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Quoted 2 lines

Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena = 0. Add warning that PF does not support hena = 0 now.

Actually this is not a fix, it's a workaround to handle some defect in legacy kernel driver. So changed title and commit log as below:

Title: workaround RSS cleanup failure handling

Allow to ignore error returned from virtual channel command
VIRTCHNL_OP_SET_RSS_HENA with hena = 0 due to some legacy kernel driver does not support this. Add warning message when this happen.

Quoted 2 lines
Fixes 95f2f0e9fc2a6("net/iavf: improve default RSS")

The fix line should be removed.

Quoted 3 lines

Acked by: Qi Zhang <[email protected]>

Applied to dpdk-next-net-intel.

Thanks
Qi

author
#3 lore raw

Hi Qi,

Quoted 34 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Tuesday, January 19, 2021 11:45 AM
To: Ding, Xuan <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Quoted 9 lines

-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Monday, January 18, 2021 4:28 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ding, Xuan <[email protected]>; [email protected]
Subject: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena =

0.

Quoted 1 line

Add warning that PF does not support hena = 0 now.

Actually this is not a fix, it’s a workaround to handle some defect in legacy kernel driver.
So changed title and commit log as below:

Title: workaround RSS cleanup failure handling

Allow to ignore error returned from virtual channel command
VIRTCHNL_OP_SET_RSS_HENA with hena = 0 due to some legacy kernel driver does not support this. Add warning message when this happen.

Quoted 1 line
Quoted 5 lines
Quoted 1 line
Fixes 95f2f0e9fc2a6("net/iavf: improve default RSS")

The fix line should be removed.

Quoted 1 line

Since fix line is removed, should CC to stable also be removed? Thanks for your correction.

Regards,
Xuan

Quoted 9 lines
Quoted 2 lines

Acked by: Qi Zhang <[email protected]>

Applied to dpdk-next-net-intel.

Thanks
Qi

#4 lore raw
Quoted 48 lines

-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Tuesday, January 19, 2021 12:35 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Hi Qi,

Quoted 36 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Tuesday, January 19, 2021 11:45 AM
To: Ding, Xuan <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Quoted 10 lines

-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Monday, January 18, 2021 4:28 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Ding, Xuan <[email protected]>; [email protected]
Subject: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling

Allow error to be returned for VIRTCHNL_OP_SET_RSS_HENA when set hena =

0.

Quoted 1 line

Add warning that PF does not support hena = 0 now.

Actually this is not a fix, it's a workaround to handle some defect in legacy kernel driver.
So changed title and commit log as below:

Title: workaround RSS cleanup failure handling

Allow to ignore error returned from virtual channel command
VIRTCHNL_OP_SET_RSS_HENA with hena = 0 due to some legacy kernel driver does not support this. Add warning message when this happen.

Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Fixes 95f2f0e9fc2a6("net/iavf: improve default RSS")

The fix line should be removed.

Quoted 1 line

Since fix line is removed, should CC to stable also be removed?

Sometime we can still have CC stable to hint backport, even its not a fix.
But for this patch, I think its not necessary, as the patch to enable hena=0 belongs to this release, so no workaround need to backport, thanks for the capture.

Quoted 15 lines

Thanks for your correction.

Regards,
Xuan

Quoted 9 lines
Quoted 2 lines

Acked by: Qi Zhang <[email protected]>

Applied to dpdk-next-net-intel.

Thanks
Qi