From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E587A2C2F for ; Wed, 17 May 2017 11:39:22 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 17 May 2017 02:39:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,353,1491289200"; d="scan'208";a="103109280" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 17 May 2017 02:39:21 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 May 2017 02:39:21 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 May 2017 02:39:21 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0319.002; Wed, 17 May 2017 17:39:18 +0800 From: "Xing, Beilei" To: Michael Lilja , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4] net/i40e: improved FDIR programming times Thread-Index: AQHSzu3EcuUblEk6806bAK8W83aAvaH4QcDQ Date: Wed, 17 May 2017 09:39:18 +0000 Message-ID: <94479800C636CB44BD422CB454846E0131FAF564@SHSMSX101.ccr.corp.intel.com> References: <20170516220132.3813-1-ml@napatech.com> <20170517091212.6503-1-ml@napatech.com> In-Reply-To: <20170517091212.6503-1-ml@napatech.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: improved FDIR programming times X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 09:39:23 -0000 Hi Michael, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michael Lilja > Sent: Wednesday, May 17, 2017 5:12 PM > To: dev@dpdk.org > Cc: Michael Lilja > Subject: [dpdk-dev] [PATCH v4] net/i40e: improved FDIR programming times >=20 > Previously, the FDIR programming time is +11ms on i40e. > This patch will result in an average programming time of 22usec with a ma= x of > 60usec . >=20 > Signed-off-by: Michael Lilja >=20 > --- > v4: > * Code style fix > --- > --- > drivers/net/i40e/i40e_fdir.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c = index > 28cc554f5..32f6aeafb 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -1296,27 +1296,27 @@ i40e_fdir_filter_programming(struct i40e_pf *pf, > rte_wmb(); > I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail); >=20 > - for (i =3D 0; i < I40E_FDIR_WAIT_COUNT; i++) { > - rte_delay_us(I40E_FDIR_WAIT_INTERVAL_US); > + for (i =3D 0; i < (I40E_FDIR_WAIT_COUNT * > I40E_FDIR_WAIT_INTERVAL_US); > +i++) { > if ((txdp->cmd_type_offset_bsz & >=20 > rte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) =3D=3D >=20 > rte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE)) > break; > + rte_delay_us(1); > } > - if (i >=3D I40E_FDIR_WAIT_COUNT) { > + if (i >=3D (I40E_FDIR_WAIT_COUNT * I40E_FDIR_WAIT_INTERVAL_US)) > { > PMD_DRV_LOG(ERR, "Failed to program FDIR filter:" > " time out to get DD on tx queue."); > return -ETIMEDOUT; > } > /* totally delay 10 ms to check programming status*/ > - rte_delay_us((I40E_FDIR_WAIT_COUNT - i) * > I40E_FDIR_WAIT_INTERVAL_US); > - if (i40e_check_fdir_programming_status(rxq) < 0) { > - PMD_DRV_LOG(ERR, "Failed to program FDIR filter:" > - " programming status reported."); > - return -ENOSYS; > + for (i =3D 0; i < (I40E_FDIR_WAIT_COUNT * > I40E_FDIR_WAIT_INTERVAL_US); i++) { To keep the original intention, "i" shouldn't be set to 0 again but keep ab= ove value. Please refer to " rte_delay_us((I40E_FDIR_WAIT_COUNT - i) *> I40E_FDIR_WAIT= _INTERVAL_US)". Sorry for missing it before. Overall it's OK for me, thanks. Beilei