DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: add VF reset check
@ 2023-05-25  2:17 Zhichao Zeng
  2023-06-02  2:38 ` [PATCH v2] " Zhichao Zeng
  0 siblings, 1 reply; 3+ messages in thread
From: Zhichao Zeng @ 2023-05-25  2:17 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, Zhichao Zeng, Jingjing Wu, Beilei Xing

This commit adds a VF reset check before the dev_reset, so that
the application can check if the iavf device comes out of reset
when calling the rte_eth_dev_reset.

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

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index e6cf897293..1cc4540c9d 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2855,6 +2855,15 @@ static int
 iavf_dev_reset(struct rte_eth_dev *dev)
 {
 	int ret;
+	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	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");
 
 	ret = iavf_dev_uninit(dev);
 	if (ret)
-- 
2.34.1


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

end of thread, other threads:[~2023-06-02  3:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25  2:17 [PATCH] net/iavf: add VF reset check Zhichao Zeng
2023-06-02  2:38 ` [PATCH v2] " Zhichao Zeng
2023-06-02  3:25   ` 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).