From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D2BDCDED for ; Tue, 1 May 2018 16:11:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2018 07:11:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,351,1520924400"; d="scan'208";a="220743813" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga005.jf.intel.com with ESMTP; 01 May 2018 07:11:17 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.214]) by IRSMSX104.ger.corp.intel.com ([169.254.5.96]) with mapi id 14.03.0319.002; Tue, 1 May 2018 15:11:16 +0100 From: "Ananyev, Konstantin" To: "Richardson, Bruce" CC: "Xing, Beilei" , "Zhang, Qi Z" , "dev@dpdk.org" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix Tx fn selection when using new ethdev offloads Thread-Index: AQHT4VO5y6DY6Vltnkyl1htmFFpY9aQa6ZkQ Date: Tue, 1 May 2018 14:11:16 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AEDC0E2D@irsmsx105.ger.corp.intel.com> References: <20180501130309.39444-1-bruce.richardson@intel.com> <2601191342CEEE43887BDE71AB977258AEDC0D90@irsmsx105.ger.corp.intel.com> <20180501135249.GB79992@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20180501135249.GB79992@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzQ1ZWM1ZDEtMTFhYS00NDU1LWI5ZDMtY2I3ODExYWU2NjVlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImlqZE5UbmF1VFVrT0IxUDh3WGpneG5jYkxpY2xZbmViRzBaZ2x3ajhUWU09In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix Tx fn selection when using new ethdev offloads 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, 01 May 2018 14:11:20 -0000 > -----Original Message----- > From: Richardson, Bruce > Sent: Tuesday, May 1, 2018 2:53 PM > To: Ananyev, Konstantin > Cc: Xing, Beilei ; Zhang, Qi Z ; dev@dpdk.org; Yigit, Ferruh > Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix Tx fn selection when using = new ethdev offloads >=20 > On Tue, May 01, 2018 at 02:24:39PM +0100, Ananyev, Konstantin wrote: > > Hi Bruce, > > > > > > > > The Tx function selection code in the driver only used the older txq > > > flags values to check whether the scalar or vector functions should b= e > > > used. This caused performance regressions with testpmd io-fwd as the > > > scalar path rather than the vector one was being used in the default > > > case. Fix this by changing the code to take account of new offloads a= nd > > > deleting the defines used for the old ones. > > > > > > Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API") > > > > > > Signed-off-by: Bruce Richardson > > > --- > > > drivers/net/i40e/i40e_rxtx.c | 45 +++++++++++++++++++++++-----------= ---------- > > > 1 file changed, 24 insertions(+), 21 deletions(-) > > > > > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxt= x.c > > > index ec1ce54ca..c523af575 100644 > > > --- a/drivers/net/i40e/i40e_rxtx.c > > > +++ b/drivers/net/i40e/i40e_rxtx.c > > > @@ -40,9 +40,6 @@ > > > /* Base address of the HW descriptor ring should be 128B aligned. */ > > > #define I40E_RING_BASE_ALIGN 128 > > > > > > -#define I40E_SIMPLE_FLAGS ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \ > > > - ETH_TXQ_FLAGS_NOOFFLOADS) > > > - > > > #define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS) > > > > > > #ifdef RTE_LIBRTE_IEEE1588 > > > @@ -70,6 +67,12 @@ > > > #define I40E_TX_OFFLOAD_NOTSUP_MASK \ > > > (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK) > > > > > > +static const uint64_t i40e_simple_ol_mask =3D (DEV_TX_OFFLOAD_MULTI_= SEGS | > > > + DEV_TX_OFFLOAD_VLAN_INSERT | > > > + DEV_TX_OFFLOAD_SCTP_CKSUM | > > > + DEV_TX_OFFLOAD_UDP_CKSUM | > > > + DEV_TX_OFFLOAD_TCP_CKSUM); > > > + > > > > Seems incomplete. > > From i40e_ethdev.c full-featured tx supports: > > dev_info->tx_offload_capa =3D > > DEV_TX_OFFLOAD_VLAN_INSERT | > > DEV_TX_OFFLOAD_QINQ_INSERT | > > DEV_TX_OFFLOAD_IPV4_CKSUM | > > DEV_TX_OFFLOAD_UDP_CKSUM | > > DEV_TX_OFFLOAD_TCP_CKSUM | > > DEV_TX_OFFLOAD_SCTP_CKSUM | > > DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | > > DEV_TX_OFFLOAD_TCP_TSO | > > DEV_TX_OFFLOAD_VXLAN_TNL_TSO | > > DEV_TX_OFFLOAD_GRE_TNL_TSO | > > DEV_TX_OFFLOAD_IPIP_TNL_TSO | > > DEV_TX_OFFLOAD_GENEVE_TNL_TSO; > > > > So we probably need the same here plus multiseg. > > BTW, it is really strange that we don't have multiseg in tx_offload_cap= a. > > Should be present I think. > > Might be worse to create a new define for it, or just use dev_info->tx_= offload_capa directly. > > Konstantin > > > Thinking about this more, it seems that right now we don't need a masks a= t > all. Any bits set in the offloads is going to cause us to use the scalar > path or to error out with an invalid offload requested. Yes, it's not > future-proofed in that it will need to be changed if we do end up > supporting some offloads with the vector path in future, but then the sam= e > problem would occur if we just re-use the advertised capabilities too, li= ke > you suggest. >=20 > Therefore I think for V2 we'll just check for a non-zero offloads value. Ok by me. Konstantin