patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Qiming Chen <chenqiming_huawei@163.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, jingjing.wu@intel.com,
	Qiming Chen <chenqiming_huawei@163.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/iavf: fix small probabilistic probe failure
Date: Sat, 11 Sep 2021 16:04:48 +0800	[thread overview]
Message-ID: <20210911080449.3738-1-chenqiming_huawei@163.com> (raw)

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


             reply	other threads:[~2021-09-11  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  8:04 Qiming Chen [this message]
2021-09-27  7:28 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210911080449.3738-1-chenqiming_huawei@163.com \
    --to=chenqiming_huawei@163.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).