From: Wenjun Wu <wenjun1.wu@intel.com>
To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: Wenjun Wu <wenjun1.wu@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v4] net/iavf: fix wrong RSS hash update
Date: Mon, 15 Mar 2021 08:59:53 +0800 [thread overview]
Message-ID: <20210315005953.32112-1-wenjun1.wu@intel.com> (raw)
In-Reply-To: <20210305060424.21917-1>
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")
Cc: stable@dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
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(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 4d3772202..8610efba6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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. */
--
2.25.1
next parent reply other threads:[~2021-03-15 1:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210305060424.21917-1>
2021-03-15 0:59 ` Wenjun Wu [this message]
2021-03-24 14:47 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
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=20210315005953.32112-1-wenjun1.wu@intel.com \
--to=wenjun1.wu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@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).