patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
@ 2021-01-18  8:15 Xuan Ding
  2021-01-18  8:28 ` [dpdk-stable] [PATCH v2] " Xuan Ding
  0 siblings, 1 reply; 5+ messages in thread
From: Xuan Ding @ 2021-01-18  8:15 UTC (permalink / raw)
  To: qi.z.zhang, jingjing.wu, beilei.xing; +Cc: dev, Xuan Ding, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index e22c62ed00..46857875ea 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
  2021-01-18  8:15 [dpdk-stable] [PATCH] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling Xuan Ding
@ 2021-01-18  8:28 ` Xuan Ding
  2021-01-19  3:45   ` Zhang, Qi Z
  0 siblings, 1 reply; 5+ messages in thread
From: Xuan Ding @ 2021-01-18  8:28 UTC (permalink / raw)
  To: qi.z.zhang, jingjing.wu, beilei.xing; +Cc: dev, Xuan Ding, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---

v2:
* Modify the commit log to avoid a spelling error.
---
 drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index e22c62ed00..46857875ea 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
  2021-01-18  8:28 ` [dpdk-stable] [PATCH v2] " Xuan Ding
@ 2021-01-19  3:45   ` Zhang, Qi Z
  2021-01-19  4:34     ` Ding, Xuan
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang, Qi Z @ 2021-01-19  3:45 UTC (permalink / raw)
  To: Ding, Xuan, Wu, Jingjing, Xing, Beilei; +Cc: dev, stable



> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Monday, January 18, 2021 4:28 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; stable@dpdk.org
> 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.
> 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.

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

The fix line should be removed.

> Cc: stable@dpdk.org
> 
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>

Acked by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
  2021-01-19  3:45   ` Zhang, Qi Z
@ 2021-01-19  4:34     ` Ding, Xuan
  2021-01-19  4:41       ` Zhang, Qi Z
  0 siblings, 1 reply; 5+ messages in thread
From: Ding, Xuan @ 2021-01-19  4:34 UTC (permalink / raw)
  To: Zhang, Qi Z, Wu, Jingjing, Xing, Beilei; +Cc: dev, stable

Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Tuesday, January 19, 2021 11:45 AM
> To: Ding, Xuan <xuan.ding@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
> 
> 
> 
> > -----Original Message-----
> > From: Ding, Xuan <xuan.ding@intel.com>
> > Sent: Monday, January 18, 2021 4:28 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> > Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; stable@dpdk.org
> > 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.
> > 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.
> 
> >
> > Fixes: 95f2f0e9fc2a6("net/iavf: improve default RSS")
> 
> The fix line should be removed.
> 
> > Cc: stable@dpdk.org

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

Regards,
Xuan

> >
> > Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> 
> Acked by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.
> 
> Thanks
> Qi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
  2021-01-19  4:34     ` Ding, Xuan
@ 2021-01-19  4:41       ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2021-01-19  4:41 UTC (permalink / raw)
  To: Ding, Xuan, Wu, Jingjing, Xing, Beilei; +Cc: dev, stable



> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Tuesday, January 19, 2021 12:35 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
> 
> Hi Qi,
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Tuesday, January 19, 2021 11:45 AM
> > To: Ding, Xuan <xuan.ding@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: RE: [PATCH v2] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA
> > handling
> >
> >
> >
> > > -----Original Message-----
> > > From: Ding, Xuan <xuan.ding@intel.com>
> > > Sent: Monday, January 18, 2021 4:28 PM
> > > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> > > <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > > Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; stable@dpdk.org
> > > 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.
> > > 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.
> >
> > >
> > > Fixes: 95f2f0e9fc2a6("net/iavf: improve default RSS")
> >
> > The fix line should be removed.
> >
> > > Cc: stable@dpdk.org
> 
> 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.

> Thanks for your correction.
> 
> Regards,
> Xuan
> 
> > >
> > > Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> >
> > Acked by: Qi Zhang <qi.z.zhang@intel.com>
> >
> > Applied to dpdk-next-net-intel.
> >
> > Thanks
> > Qi
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-19  4:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18  8:15 [dpdk-stable] [PATCH] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling Xuan Ding
2021-01-18  8:28 ` [dpdk-stable] [PATCH v2] " Xuan Ding
2021-01-19  3:45   ` Zhang, Qi Z
2021-01-19  4:34     ` Ding, Xuan
2021-01-19  4:41       ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git