patches for DPDK stable branches
 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

* RE: [PATCH] net/iavf: fix fail to reset vf when using dcf
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Li, HongboX @ 2024-03-19  9:51 UTC (permalink / raw)
  To: Deng, KaiwenX, dev; +Cc: stable

> -----Original Message-----
> From: Kaiwen Deng <kaiwenx.deng@intel.com>
> Sent: Thursday, March 14, 2024 9:01 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhou, YidingX <yidingx.zhou@intel.com>; Deng, KaiwenX
> <kaiwenx.deng@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Zeng,
> ZhichaoX <zhichaox.zeng@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/iavf: fix fail to reset vf when using dcf
> 
> 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>

Tested-by: Li, HongboX <hongbox.li@intel.com>

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

* Re: [PATCH] net/iavf: fix fail to reset vf when using dcf
  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 10:58 ` Bruce Richardson
  1 sibling, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2024-04-04 10:58 UTC (permalink / raw)
  To: Kaiwen Deng
  Cc: dev, stable, yidingx.zhou, Jingjing Wu, Zhichao Zeng, Qi Zhang

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
> 

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

* Re: [PATCH] net/iavf: fix fail to reset vf when using dcf
  2024-03-19  9:51 ` Li, HongboX
@ 2024-04-04 13:42   ` Bruce Richardson
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2024-04-04 13:42 UTC (permalink / raw)
  To: Li, HongboX; +Cc: Deng, KaiwenX, dev, stable

On Tue, Mar 19, 2024 at 09:51:00AM +0000, Li, HongboX wrote:
> > -----Original Message-----
> > From: Kaiwen Deng <kaiwenx.deng@intel.com>
> > Sent: Thursday, March 14, 2024 9:01 AM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhou, YidingX <yidingx.zhou@intel.com>; Deng, KaiwenX
> > <kaiwenx.deng@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Zeng,
> > ZhichaoX <zhichaox.zeng@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH] net/iavf: fix fail to reset vf when using dcf
> > 
> > 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>
> 
> Tested-by: Li, HongboX <hongbox.li@intel.com>

Applied to dpdk-next-net-intel.
thanks,
/Bruce

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