From 7dd0d9f29f426c7355427a6f1ce439ff84e433e2 Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Fri, 13 Nov 2020 00:46:42 +0000 Subject: [PATCH] net/iavf: fix RSS 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") Cc: stable@dpdk.org Signed-off-by: Steve Yang Acked-by: Qi Zhang --- drivers/net/iavf/iavf_hash.c | 6 ++++++ 1 file changed, 6 insertions(+) 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"); -- 2.20.1