DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix fail to reset vf when using dcf
@ 2024-03-14  1:00 Kaiwen Deng
  2024-03-19  9:51 ` Li, HongboX
  2024-04-04 10:58 ` Bruce Richardson
  0 siblings, 2 replies; 4+ messages in thread
From: Kaiwen Deng @ 2024-03-14  1:00 UTC (permalink / raw)
  To: dev
  Cc: stable, yidingx.zhou, Kaiwen Deng, Jingjing Wu, Zhichao Zeng, Qi Zhang

On the latest ice kernel driver, renegotiating VIRTCHNL_OP_GET_VF_RESOURCES
will fail without hardware reset when using dcf.

This commit will send VIRTCHNL_OP_RESET_VF to pf before dpdk resets vf.

Fixes: 7a93cd3575eb ("net/iavf: add VF reset check")
Cc: stable@dpdk.org

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 245b3cd854..1c2d23f80f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -3038,6 +3038,16 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+	if (!vf->in_reset_recovery) {
+		ret = iavf_aq_send_msg_to_pf(hw, VIRTCHNL_OP_RESET_VF,
+						IAVF_SUCCESS, NULL, 0, NULL);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "fail to send cmd VIRTCHNL_OP_RESET_VF");
+			return ret;
+		}
+	}
 
 	/*
 	 * Check whether the VF reset has been done and inform application,
-- 
2.34.1


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

end of thread, other threads:[~2024-04-04 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14  1:00 [PATCH] net/iavf: fix fail to reset vf when using dcf Kaiwen Deng
2024-03-19  9:51 ` Li, HongboX
2024-04-04 13:42   ` Bruce Richardson
2024-04-04 10:58 ` Bruce Richardson

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