patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Kaiwen Deng <kaiwenx.deng@intel.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>, <yidingx.zhou@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Zhichao Zeng <zhichaox.zeng@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>
Subject: Re: [PATCH] net/iavf: fix fail to reset vf when using dcf
Date: Thu, 4 Apr 2024 11:58:01 +0100	[thread overview]
Message-ID: <Zg6HuYeDJz92-TgI@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240314010049.340381-1-kaiwenx.deng@intel.com>

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@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
> 

      parent reply	other threads:[~2024-04-04 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  1:00 Kaiwen Deng
2024-03-19  9:51 ` Li, HongboX
2024-04-04 13:42   ` Bruce Richardson
2024-04-04 10:58 ` Bruce Richardson [this message]

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=Zg6HuYeDJz92-TgI@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=kaiwenx.deng@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).