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 DE6BEA0547; Mon, 27 Sep 2021 09:28:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E5BD40686; Mon, 27 Sep 2021 09:28:37 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3B86B4003D; Mon, 27 Sep 2021 09:28:35 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10119"; a="285435176" X-IronPort-AV: E=Sophos;i="5.85,325,1624345200"; d="scan'208";a="285435176" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 00:28:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,325,1624345200"; d="scan'208";a="437618982" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga003.jf.intel.com with ESMTP; 27 Sep 2021 00:28:33 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 27 Sep 2021 00:28:32 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 27 Sep 2021 15:28:30 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.012; Mon, 27 Sep 2021 15:28:30 +0800 From: "Zhang, Qi Z" To: Qiming Chen , "dev@dpdk.org" CC: "Xing, Beilei" , "Wu, Jingjing" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure Thread-Index: AQHXpuPefikd5zygNUmhJwIEsd3y2qu3ke/w Date: Mon, 27 Sep 2021 07:28:30 +0000 Message-ID: <0a5ac9b6c9fd42bf9bca3e9cab978540@intel.com> References: <20210911080449.3738-1-chenqiming_huawei@163.com> In-Reply-To: <20210911080449.3738-1-chenqiming_huawei@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Qiming Chen > Sent: Saturday, September 11, 2021 4:05 PM > To: dev@dpdk.org > Cc: Xing, Beilei ; Wu, Jingjing ; > Qiming Chen ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/iavf: fix small probabilistic probe failu= re >=20 > In the embedded RTOS environment, the x722 controller Ethernet card of th= e > d2146nt chip, the vfio user mode driver takes over 8 vf ports in turn, bu= t > iavf_check_vf_reset_done will probably fail. >=20 > 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 whe= n 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? =20 > 2) In the same way, by checking and checking, it is found that the probab= ility > of vf sending a command to the interrupt thread receiving the message wil= l > occur for more than 12s, and there is no failure, so the time is adjusted= to 15s. >=20 > the repeated restart process took over the start port test, and it was fo= und that > this probability was reduced to an order of magnitude acceptable to the u= ser. >=20 > The patch cannot fundamentally solve the failure problem, but it greatly = slows > down the probability of the problem. The modification is based on the i40= evf > kernel driver. >=20 > Fixes: 22b123a36d07 ("net/avf: initialize PMD") > Cc: stable@dpdk.org >=20 > 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(-) >=20 > 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 @@ >=20 > #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" >=20 > -#define MAX_TRY_TIMES 200 > +#define MAX_TRY_TIMES 1500 > #define ASQ_DELAY_MS 10 >=20 > static uint32_t > -- > 2.30.1.windows.1