patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix dev stop return value
@ 2023-03-16  7:14 Zhichao Zeng
  2023-03-16 10:29 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Zhichao Zeng @ 2023-03-16  7:14 UTC (permalink / raw)
  To: dev
  Cc: stable, yidingx.zhou, qi.z.zhang, Zhichao Zeng, Jingjing Wu, Beilei Xing

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: stable@dpdk.org

Signed-off-by: Zhichao Zeng <zhichaox.zeng@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-16 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16  7:14 [PATCH] net/iavf: fix dev stop return value Zhichao Zeng
2023-03-16 10:29 ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).