net/iavf: fix duplicate reset done check with large VF
Checks
Commit Message
This patch fixes duplicate VF reset done check in dev_reset with large VF,
which cause some errors when starting testpmd with large VF.
Fixes: 7a93cd3575eb ("net/iavf: add VF reset check")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
@@ -2859,15 +2859,17 @@ iavf_dev_reset(struct rte_eth_dev *dev)
int ret;
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- /*
- * Check whether the VF reset has been done and inform application,
- * to avoid calling the virtual channel command, which may cause
- * the device to be abnormal.
- */
- ret = iavf_check_vf_reset_done(hw);
- if (ret) {
- PMD_DRV_LOG(ERR, "Wait too long for reset done!\n");
- return ret;
+ if (dev->data->nb_rx_queues <= IAVF_MAX_NUM_QUEUES_DFLT) {
+ /*
+ * Check whether the VF reset has been done and inform application,
+ * to avoid calling the virtual channel command, which may cause
+ * the device to be abnormal.
+ */
+ ret = iavf_check_vf_reset_done(hw);
+ if (ret) {
+ PMD_DRV_LOG(ERR, "Wait too long for reset done!\n");
+ return ret;
+ }
}
PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");