Skip to contentSkip to conversation

net/iavf: fix dev stop return value

PATCH Applied Zhichao Zeng 2 participants 2 messages Mar 16, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix dev stop return value

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")
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/iavf/iavf_ethdev.c +3 -0
index 3196210f2c..f6d68403ce 100644
@@ -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;
 
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 14 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Thursday, March 16, 2023 3:15 PM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Subject: [PATCH] net/iavf: fix dev stop return value

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

Quoted 6 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi