* [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure
@ 2021-09-11 8:04 Qiming Chen
2021-09-27 7:28 ` Zhang, Qi Z
0 siblings, 1 reply; 2+ messages in thread
From: Qiming Chen @ 2021-09-11 8:04 UTC (permalink / raw)
To: dev; +Cc: beilei.xing, jingjing.wu, Qiming Chen, stable
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: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure
2021-09-11 8:04 [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure Qiming Chen
@ 2021-09-27 7:28 ` Zhang, Qi Z
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-09-27 7:28 UTC (permalink / raw)
To: Qiming Chen, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Saturday, September 11, 2021 4:05 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure
>
> 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,
Increase timeout from 1s to 5s may give bad user experience in the case when a vf is not expected to be init successfully due to some wrong ops.
Maybe its better to introduce a compile option or devargs for this?
> 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: stable@dpdk.org
>
> Signed-off-by: Qiming Chen <chenqiming_huawei@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-27 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 8:04 [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure Qiming Chen
2021-09-27 7:28 ` Zhang, Qi Z
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).