[PATCH] net/iavf: fix fail to reset vf when using dcf
Bruce Richardson
bruce.richardson at intel.com
Thu Apr 4 12:58:01 CEST 2024
On Thu, Mar 14, 2024 at 09:00:49AM +0800, Kaiwen Deng wrote:
> 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")
It could be argued that the offending commit could actually be earlier:
Fixes: e74e1bb6280d ("net/iavf: enable port reset")
When applying, I'll add both commits as fixes lines.
> Cc: stable at dpdk.org
>
> Signed-off-by: Kaiwen Deng <kaiwenx.deng at 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
>
More information about the dev
mailing list