net/iavf: fix fail to reset vf when using dcf
PATCH 1/1 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.
--- drivers/net/iavf/iavf_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/iavf/iavf_ethdev.c +10 -0
@@ -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,
Signature · 1 line
2.34.1
Quoted 12 lines
-----Original Message-----
From: Kaiwen Deng <[email protected]>
Sent: Thursday, March 14, 2024 9:01 AM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Deng, KaiwenX <[email protected]>; Wu, Jingjing <[email protected]>; Zeng, ZhichaoX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH] net/iavf: fix fail to reset vf when using dcfOn the latest ice kernel driver, renegotiating
VIRTCHNL_OP_GET_VF_RESOURCESwill fail without hardware reset when using dcf.
Quoted 6 lines
This commit will send
VIRTCHNL_OP_RESET_VFto pf before dpdk resets vf.Fixes 7a93cd3575eb ("net/iavf: add VF reset check")Signed-off-by Kaiwen Deng <[email protected]>
Bruce Richardson
AppliedQuoted 12 lines · HongboX
Quoted 12 lines
-----Original Message-----
From: Kaiwen Deng <[email protected]>
Sent: Thursday, March 14, 2024 9:01 AM
To: [email protected]
Cc: [email protected]; Zhou, YidingX <[email protected]>; Deng, KaiwenX <[email protected]>; Wu, Jingjing <[email protected]>; Zeng, ZhichaoX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH] net/iavf: fix fail to reset vf when using dcfOn the latest ice kernel driver, renegotiating
VIRTCHNL_OP_GET_VF_RESOURCESwill fail without hardware reset when using dcf.
Quoted 8 lines
Quoted 6 lines
This commit will send
VIRTCHNL_OP_RESET_VFto pf before dpdk resets vf.Fixes 7a93cd3575eb ("net/iavf: add VF reset check")Signed-off-by Kaiwen Deng <[email protected]>Tested-by Li, HongboX <[email protected]>
Applied to dpdk-next-net-intel.
thanks,
/Bruce
Quoted 6 lines · Kaiwen Deng
On the latest ice kernel driver, renegotiating
VIRTCHNL_OP_GET_VF_RESOURCESwill fail without hardware reset when using dcf.This commit will send
VIRTCHNL_OP_RESET_VFto 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:
When applying, I'll add both commits as fixes lines.
Quoted 31 lines
Signed-off-by Kaiwen Deng <[email protected]>--- drivers/net/iavf/iavf_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/net/iavf/iavf_ethdev.c +10
-0@@ -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, Signature · 1 line
2.34.1