[v3,2/2] net/iavf: fix the RSS error when VF port closed

Message ID 20201113004642.17115-3-stevex.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v3,1/2] net/iavf: fix reset VF doesn't notify PF to reset |

Checks

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

Commit Message

Steve Yang Nov. 13, 2020, 12:46 a.m. UTC
  Check the VF RSS offload flag and ignore relative operation when
iavf hash uninit to avoid reset/close error.

Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Qi Zhang Nov. 13, 2020, 5:38 a.m. UTC | #1
> -----Original Message-----
> From: Steve Yang <stevex.yang@intel.com>
> Sent: Friday, November 13, 2020 8:47 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>
> Subject: [PATCH v3 2/2] net/iavf: fix the RSS error when VF port closed
> 
> Check the VF RSS offload flag and ignore relative operation when iavf hash
> uninit to avoid reset/close error.
> 
> Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")
> 
> Signed-off-by: Steve Yang <stevex.yang@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 8a5a6bb5a4..c4c73e6644 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -1093,6 +1093,12 @@  iavf_hash_uninit(struct iavf_adapter *ad)
 	if (vf->vf_reset)
 		return;
 
+	if (!vf->vf_res)
+		return;
+
+	if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF))
+		return;
+
 	if (iavf_hash_default_set(ad, false))
 		PMD_DRV_LOG(ERR, "fail to delete default RSS");