patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Xuan Ding <xuan.ding@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, Xuan Ding <xuan.ding@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/iavf: fix VIRTHCNL_OP_SET_RSS_HENA handling
Date: Mon, 18 Jan 2021 08:15:06 +0000	[thread overview]
Message-ID: <20210118081506.107794-1-xuan.ding@intel.com> (raw)

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


             reply	other threads:[~2021-01-18  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  8:15 Xuan Ding [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210118081506.107794-1-xuan.ding@intel.com \
    --to=xuan.ding@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).