From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80CD1A0548 for ; Sat, 11 Sep 2021 10:05:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A2BE40A4B; Sat, 11 Sep 2021 10:05:43 +0200 (CEST) Received: from mail-m974.mail.163.com (mail-m974.mail.163.com [123.126.97.4]) by mails.dpdk.org (Postfix) with ESMTP id D50E540041; Sat, 11 Sep 2021 10:05:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=MkqEG Ph/PQ/EcpoIMKTPK5o18nd40t7TfPbkjW7U8PU=; b=Qe9VBxHHmiOjWnEzz1rCZ qoHVC+Rd/nGDa8TvgW+ttgPXEbKSNwORpbPVuRB+3PB6jVzvCF5TWNuZabGHh82H k7nDqDqCdUvLZtH1vrEfK6MpiDtFRIOsMHlDoJDXobASKu3GJxgXhesFAD6EZyVN quvv7Dpfp5RGsO8UQPPwLM= Received: from localhost.localdomain (unknown [124.160.213.250]) by smtp4 (Coremail) with SMTP id HNxpCgBXt+BLYzxhhL_HCA--.965S2; Sat, 11 Sep 2021 16:05:34 +0800 (CST) From: Qiming Chen To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, Qiming Chen , stable@dpdk.org Date: Sat, 11 Sep 2021 16:04:48 +0800 Message-Id: <20210911080449.3738-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: HNxpCgBXt+BLYzxhhL_HCA--.965S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Kw4xJryxJrW3tF1kZFykGrg_yoW8uFy3pF 4xAry29r4DJa17W34Ut3W8Ary3W397JrWUGFWkCa95Xa1rC3WUAryUKF4UAF1UXF48Ca4a qayUAFyUuF93J37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j7pnPUUUUU= X-Originating-IP: [124.160.213.250] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/1tbiNg8LoFWBoEtFzwAAsn Subject: [dpdk-stable] [PATCH] net/iavf: fix small probabilistic probe failure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "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 --- 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