The RSS engine checks `vf_reset` during init, destroy and uninit to avoid
sending virtchnl commands while the VF is resetting. These checks are no
longer needed:

- `iavf_hash_init()` only registers the parser and sends no commands.
- `iavf_dev_close()` skips both flow flush and RSS teardown during
  PF-initiated reset recovery.
- the generic flow layer frees rule memory without relying on engine
  callbacks.
- `iavf_execute_vf_cmd()` already refuses to send commands while
  `vf_reset` is set.

Remove these checks as they are no longer needed.

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

diff --git a/drivers/net/intel/iavf/iavf_hash.c 
b/drivers/net/intel/iavf/iavf_hash.c
index 6352bf28f93..fe5d725064b 100644
--- a/drivers/net/intel/iavf/iavf_hash.c
+++ b/drivers/net/intel/iavf/iavf_hash.c
@@ -762,9 +762,6 @@ iavf_hash_init(struct iavf_adapter *ad)
        struct iavf_flow_parser *parser;
        int ret;
 
-       if (vf->vf_reset)
-               return -EIO;
-
        if (!vf->vf_res)
                return -EINVAL;
 
@@ -1601,13 +1598,9 @@ iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,
                  struct rte_flow *flow,
                  __rte_unused struct rte_flow_error *error)
 {
-       struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
        struct virtchnl_rss_cfg *rss_cfg;
        int ret = 0;
 
-       if (vf->vf_reset)
-               return 0;
-
        rss_cfg = (struct virtchnl_rss_cfg *)flow->rule;
 
        ret = iavf_add_del_rss_cfg(ad, rss_cfg, false);
@@ -1633,9 +1626,6 @@ iavf_hash_uninit(struct iavf_adapter *ad)
        struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
        struct rte_eth_rss_conf *rss_conf;
 
-       if (vf->vf_reset)
-               return;
-
        if (!vf->vf_res)
                return;
 
-- 
2.52.0

Reply via email to