From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2F930106A for ; Tue, 17 Jan 2017 16:09:21 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 17 Jan 2017 07:09:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,245,1477983600"; d="scan'208";a="809937174" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jan 2017 07:09:19 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 07:09:19 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 07:09:19 -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, 17 Jan 2017 23:09:16 +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/34SJPIkaHQU5i83dI2KE8w11g Date: Tue, 17 Jan 2017 15:09:15 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810CCA338@SHSMSX103.ccr.corp.intel.com> References: <9BB6961774997848B5B42BEC655768F810CBEF56@SHSMSX103.ccr.corp.intel.com> <1484581948-10736-1-git-send-email-rory.sexton@intel.com> In-Reply-To: <1484581948-10736-1-git-send-email-rory.sexton@intel.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 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, 17 Jan 2017 15:09:21 -0000 > -----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 >=20 > From: Rory Sexton >=20 > 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 ar= e > dropped, and they do this when the SW descriptor rings fill up. >=20 > This patch changes this behaviour and our testing shows there are no drop= s > as a result. >=20 > Signed-off-by: Rory Sexton > Signed-off-by: Nemanja Marjanovic > --- > v2: > * Changed to use existing api to set priority register directly. >=20 > drivers/net/i40e/i40e_ethdev.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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(); >=20 > + I40E_WRITE_REG(hw, I40E_PRTDCB_TC2PFC, 0xff); PRTDCB_TC2PFC is the Bitmap who controls the use of Priority Flow Control = (PFC) per each TC. Bit n set to 1b indicates TC n uses PFC in Rx and Tx. The TC is referre= d as a no-drop TC. And if look the rte_eth_pfc_conf, there is a field called priority, which w= ould 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); Thanks Jingjing > return -ENOSYS; > } >=20 > -- > 2.4.3