When VF begin reset after PF reset, VF will be uninitialized at first
and then be initialized, during the time any invalid cmd such as flow
flush should not be sent to PF until the uninitialization is finished.
Fixes:
1eab95fe2e36 ("net/iavf: fix command after PF reset")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
}
}
- vf->vf_reset = false;
-
return 0;
err_rss:
rte_free(vf->rss_key);
rte_free(vf->aq_resp);
vf->aq_resp = NULL;
+ vf->vf_reset = false;
+
return 0;
}
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);
int err = 0;
int i = 0;
- if (_atomic_set_cmd(vf, args->ops))
- return -1;
-
if (vf->vf_reset)
return -EIO;
+ if (_atomic_set_cmd(vf, args->ops))
+ return -1;
+
ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
args->in_args, args->in_args_size, NULL);
if (ret) {
switch (pf_msg->event) {
case VIRTCHNL_EVENT_RESET_IMPENDING:
PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
+ vf->vf_reset = true;
rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
NULL);
break;