From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3DC1F282 for ; Tue, 7 Feb 2017 16:26:00 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP; 07 Feb 2017 07:25:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="62199277" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 07 Feb 2017 07:25:57 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Feb 2017 07:25:57 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Tue, 7 Feb 2017 23:25:54 +0800 From: "Wu, Jingjing" To: "Sexton, Rory" CC: "dev@dpdk.org" , "Marjanovic, Nemanja" Thread-Topic: [PATCH v2] net/i40e: set no drop for traffic class Thread-Index: AQHScBCjNY/34SJPIkaHQU5i83dI2KE8w11ggAJWmwCAHrKeYA== Date: Tue, 7 Feb 2017 15:25:54 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810CD5C15@SHSMSX103.ccr.corp.intel.com> References: <9BB6961774997848B5B42BEC655768F810CBEF56@SHSMSX103.ccr.corp.intel.com> <1484581948-10736-1-git-send-email-rory.sexton@intel.com> <9BB6961774997848B5B42BEC655768F810CCA338@SHSMSX103.ccr.corp.intel.com> In-Reply-To: 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 v2] net/i40e: set no drop for traffic class 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: Tue, 07 Feb 2017 15:26:01 -0000 > -----Original Message----- > From: Sexton, Rory > Sent: Thursday, January 19, 2017 6:38 PM > To: Wu, Jingjing > Cc: dev@dpdk.org; Marjanovic, Nemanja > Subject: RE: [PATCH v2] net/i40e: set no drop for traffic class >=20 > Perhaps the best solution is as suggested to set rte_eth_conf.dcb_capabil= ity_en > =3D ETH_DCB_PFC_SUPPORT rte_eth_conf.rxmode.mq_mode =3D > ETH_MQ_RX_DCB_FLAG and set rte_eth_dcb_rx_conf.nb_tcs to the number of > tc's to apply Using this port configuration will give the same behavior o= f the > patch and it removes the need for an API change. >=20 > Rory >=20 Yes, That's what I thought when the v1 patch. So do we still need this patc= h now? > -----Original Message----- > From: Wu, Jingjing > Sent: Tuesday, January 17, 2017 3:09 PM > To: Sexton, Rory > Cc: dev@dpdk.org; Marjanovic, Nemanja > Subject: RE: [PATCH v2] net/i40e: set no drop for traffic class >=20 >=20 >=20 > > -----Original Message----- > > From: Sexton, Rory > > Sent: Monday, January 16, 2017 11:52 PM > > To: Wu, Jingjing > > Cc: dev@dpdk.org; Sexton, Rory ; Marjanovic, > > Nemanja > > Subject: [PATCH v2] net/i40e: set no drop for traffic class > > > > From: Rory Sexton > > > > The default traffic class in i40e is set to drop versus on ixgbe it > > isset to no drop. This means when packets build up in the RX SRAM on > > the NIC, they are dropped, and they do this when the SW descriptor ring= s fill up. > > > > This patch changes this behaviour and our testing shows there are no > > drops as a result. > > > > Signed-off-by: Rory Sexton > > Signed-off-by: Nemanja Marjanovic > > --- > > v2: > > * Changed to use existing api to set priority register directly. > > > > drivers/net/i40e/i40e_ethdev.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index 67778ba..97339b5 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -2985,8 +2985,11 @@ static int > > i40e_priority_flow_ctrl_set(__rte_unused struct rte_eth_dev *dev, > > __rte_unused struct rte_eth_pfc_conf *pfc_conf) { > > + struct i40e_hw *hw =3D I40E_DEV_PRIVATE_TO_HW(dev->data- > > >dev_private); > > + > > PMD_INIT_FUNC_TRACE(); > > > > + I40E_WRITE_REG(hw, I40E_PRTDCB_TC2PFC, 0xff); >=20 > PRTDCB_TC2PFC is the Bitmap who controls the use of Priority Flow Contro= l > (PFC) per each TC. Bit n set to 1b indicates TC n uses PFC in Rx and Tx. = The TC is > referred as a no-drop TC. >=20 > And if look the rte_eth_pfc_conf, there is a field called priority, which= would > map to a TC. > Currently, the TC and priority is 1:1 map when dcb is enabled. > So how about change it like: > Check dcb info, and map the priority to tc, then val =3D 0x1 << tc; > I40E_WRITE_REG(hw, I40E_PRTDCB_TC2PFC, val); >=20 > Thanks > Jingjing >=20 >=20 >=20 > > return -ENOSYS; > > } > > > > -- > > 2.4.3