[v2] net/iavf: fix duplicate reset done check with large VF

Message ID 20230630060616.1569254-1-zhichaox.zeng@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/iavf: fix duplicate reset done check with large VF |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Zhichao Zeng June 30, 2023, 6:06 a.m. UTC
  When starting with large vf, need to reset VF to request queues, the reset
process will execute VIRTCHNL commands to clean up resource.

VF reset done check and reset watchdog read the same global register,
resulting in the NIC not responding to the VIRTCHNL command.

This patch turns off the watchdog when request queues to avoid
the VIRTCHNL command timeout error when starting with large VF.

Fixes: af801b0374e3 ("net/iavf: add devargs to control watchdog")
Fixes: 7a93cd3575eb ("net/iavf: add VF reset check")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Qi Zhang June 30, 2023, 8:04 a.m. UTC | #1
> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Friday, June 30, 2023 2:06 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Jiale, SongX <songx.jiale@intel.com>;
> Zeng, ZhichaoX <zhichaox.zeng@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH v2] net/iavf: fix duplicate reset done check with large VF
> 
> When starting with large vf, need to reset VF to request queues, the reset
> process will execute VIRTCHNL commands to clean up resource.
> 
> VF reset done check and reset watchdog read the same global register,
> resulting in the NIC not responding to the VIRTCHNL command.
> 
> This patch turns off the watchdog when request queues to avoid the VIRTCHNL
> command timeout error when starting with large VF.
> 
> Fixes: af801b0374e3 ("net/iavf: add devargs to control watchdog")
> Fixes: 7a93cd3575eb ("net/iavf: add VF reset check")
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 00b963128b..ac7154d720 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -577,6 +577,7 @@  iavf_queues_req_reset(struct rte_eth_dev *dev, uint16_t num)
 	PMD_DRV_LOG(INFO, "change queue pairs from %u to %u",
 			vf->vsi_res->num_queue_pairs, num);
 
+	iavf_dev_watchdog_disable(ad);
 	ret = iavf_dev_reset(dev);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "vf reset failed");