diff mbox series

[v4] net/iavf: fix wrong RSS hash update

Message ID 20210315005953.32112-1-wenjun1.wu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series [v4] net/iavf: fix wrong RSS hash update | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Wenjun Wu March 15, 2021, 12:59 a.m. UTC
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(-)

Comments

Ferruh Yigit March 24, 2021, 2:47 p.m. UTC | #1
On 3/15/2021 12:59 AM, Wenjun Wu wrote:
> 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.

Applied to dpdk-next-net-intel.
diff mbox series

Patch

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. */