The rte_eth_dev_stop will return wrong value as error will return from
iavf PMD during device reset.

This patch is a around to fix it by return 0 in dev_stop during
device reset.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: sta...@dpdk.org

Signed-off-by: Zhichao Zeng <zhichaox.z...@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 3196210f2c..f6d68403ce 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1065,6 +1065,9 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 
        PMD_INIT_FUNC_TRACE();
 
+       if (vf->vf_reset)
+               return 0;
+
        if (adapter->closed)
                return -1;
 
-- 
2.25.1

Reply via email to