> -----Original Message-----
> From: dev <[email protected]> On Behalf Of Steve Yang
> Sent: Monday, November 9, 2020 2:52 PM
> To: [email protected]
> Cc: Yang, Qiming <[email protected]>; Xing, Beilei
> <[email protected]>; Wu, Jingjing <[email protected]>; Yang, SteveX
> <[email protected]>
> Subject: [dpdk-dev] [PATCH v2 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 <[email protected]>
> ---
> drivers/net/iavf/iavf_hash.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> 8a5a6bb5a4..d3e9218f75 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -1093,10 +1093,13 @@ iavf_hash_uninit(struct iavf_adapter *ad)
> if (vf->vf_reset)
> return;
>
> - if (iavf_hash_default_set(ad, false))
> - PMD_DRV_LOG(ERR, "fail to delete default RSS");
> + if (vf->vf_res &&
> + vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) {
> + if (iavf_hash_default_set(ad, false))
> + PMD_DRV_LOG(ERR, "fail to delete default RSS");
Better to follow the same pattern in ice_hash_init, return immediate when check
something wrong.
>
> - iavf_unregister_parser(&iavf_hash_parser, ad);
> + iavf_unregister_parser(&iavf_hash_parser, ad);
> + }
> }
>
> static void
> --
> 2.17.1