In the embedded RTOS environment, the x722 controller Ethernet card of the d2146nt chip, the vfio user mode driver takes over 8 vf ports in turn, but iavf_check_vf_reset_done will probably fail.
This issue has been discussed with intel&dpdk experts for 3 rounds before, and the version matching is no problem, and there is no substantial progress. 1) Learning from the implementation of the i40evf kernel driver locally, after modifying the polling time from 1 second to 5s, 2) In the same way, by checking and checking, it is found that the probability of vf sending a command to the interrupt thread receiving the message will occur for more than 12s, and there is no failure, so the time is adjusted to 15s. the repeated restart process took over the start port test, and it was found that this probability was reduced to an order of magnitude acceptable to the user. The patch cannot fundamentally solve the failure problem, but it greatly slows down the probability of the problem. The modification is based on the i40evf kernel driver. Fixes: 22b123a36d07 ("net/avf: initialize PMD") Cc: sta...@dpdk.org Signed-off-by: Qiming Chen <chenqiming_hua...@163.com> --- drivers/net/iavf/iavf.h | 2 +- drivers/net/iavf/iavf_vchnl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index b3bd078111..b3732d1185 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -16,7 +16,7 @@ #define IAVF_AQ_LEN 32 #define IAVF_AQ_BUF_SZ 4096 -#define IAVF_RESET_WAIT_CNT 50 +#define IAVF_RESET_WAIT_CNT 250 #define IAVF_BUF_SIZE_MIN 1024 #define IAVF_FRAME_SIZE_MAX 9728 #define IAVF_QUEUE_BASE_ADDR_UNIT 128 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 2f39c2077c..25066419b0 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -23,7 +23,7 @@ #include "iavf.h" #include "iavf_rxtx.h" -#define MAX_TRY_TIMES 200 +#define MAX_TRY_TIMES 1500 #define ASQ_DELAY_MS 10 static uint32_t -- 2.30.1.windows.1