During PF-initiated reset recovery, `iavf_dev_close()` skips flow flush
to avoid sending virtchnl messages to the PF. However, `iavf_hash_uninit()`
is still called unconditionally, even though any existing RSS configuration
is now invalid because of PF-initiated reset.

Move the RSS teardown under the same `pf_reset_in_progress` check as flow
flush, so that no RSS configuration messages are sent during PF-initiated
reset recovery.

Fixes: 4dad1a6815d6 ("net/iavf: skip flow flush during PF-initiated reset")
Cc: [email protected]

Signed-off-by: Anatoly Burakov <[email protected]>
---
 drivers/net/intel/iavf/iavf_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_ethdev.c 
b/drivers/net/intel/iavf/iavf_ethdev.c
index 891880cf6e6..26f891515ec 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3246,12 +3246,12 @@ iavf_dev_close(struct rte_eth_dev *dev)
        /* free iAVF security device context all related resources */
        iavf_security_ctx_destroy(adapter);
 
-       /* remove RSS configuration */
-       iavf_hash_uninit(adapter);
-
        /* Skip the virtchnl-emitting teardown on a PF-initiated reset */
-       if (!vf->pf_reset_in_progress)
+       if (!vf->pf_reset_in_progress) {
+               /* remove RSS configuration */
+               iavf_hash_uninit(adapter);
                iavf_flow_flush(dev, NULL);
+       }
        iavf_flow_uninit(adapter);
 
        /*
-- 
2.52.0

Reply via email to