From: Kaiwen Deng <kaiwenx.deng@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, yidingx.zhou@intel.com,
Kaiwen Deng <kaiwenx.deng@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Zhichao Zeng <zhichaox.zeng@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH] net/iavf: fix fail to reset vf when using dcf
Date: Thu, 14 Mar 2024 09:00:49 +0800 [thread overview]
Message-ID: <20240314010049.340381-1-kaiwenx.deng@intel.com> (raw)
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
next reply other threads:[~2024-03-14 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 1:00 Kaiwen Deng [this message]
2024-03-19 9:51 ` Li, HongboX
2024-04-04 13:42 ` Bruce Richardson
2024-04-04 10:58 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240314010049.340381-1-kaiwenx.deng@intel.com \
--to=kaiwenx.deng@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@intel.com \
--cc=zhichaox.zeng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).