From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 849353B5 for ; Wed, 8 Feb 2017 01:34:38 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP; 07 Feb 2017 16:34:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="63080005" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2017 16:34:36 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX152.ger.corp.intel.com ([169.254.6.191]) with mapi id 14.03.0248.002; Wed, 8 Feb 2017 00:34:35 +0000 From: "Ananyev, Konstantin" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags Thread-Index: AQHSf6dn0w0KUl2CgUG4bhSpGCevDqFaUKRwgAFdKYCAADQ5YIAA8s6AgAFuSmA= Date: Wed, 8 Feb 2017 00:34:34 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583F11492C@irsmsx105.ger.corp.intel.com> References: <1485258650-86193-1-git-send-email-jingjing.wu@intel.com> <1486179375-133509-1-git-send-email-jingjing.wu@intel.com> <1486179375-133509-4-git-send-email-jingjing.wu@intel.com> <2601191342CEEE43887BDE71AB9772583F110FFC@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772583F111017@irsmsx105.ger.corp.intel.com> <9BB6961774997848B5B42BEC655768F810CD4FA3@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB9772583F1114A4@irsmsx105.ger.corp.intel.com> <9BB6961774997848B5B42BEC655768F810CD55B9@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810CD55B9@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx flags 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, 08 Feb 2017 00:34:39 -0000 > -----Original Message----- > From: Wu, Jingjing > Sent: Tuesday, February 7, 2017 2:30 AM > To: Ananyev, Konstantin ; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of supporte= d Tx flags >=20 >=20 >=20 > > -----Original Message----- > > From: Ananyev, Konstantin > > Sent: Monday, February 6, 2017 8:11 PM > > To: Wu, Jingjing ; dev@dpdk.org > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of suppor= ted > > Tx flags > > > > > > > > > -----Original Message----- > > > From: Wu, Jingjing > > > Sent: Monday, February 6, 2017 8:54 AM > > > To: Ananyev, Konstantin ; dev@dpdk.org > > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of > > > supported Tx flags > > > > > > > > > > > > > -----Original Message----- > > > > From: Ananyev, Konstantin > > > > Sent: Sunday, February 5, 2017 8:11 PM > > > > To: Ananyev, Konstantin ; Wu, Jingjin= g > > > > ; dev@dpdk.org > > > > Subject: RE: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of > > > > supported Tx flags > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, > > > > > Konstantin > > > > > Sent: Sunday, February 5, 2017 11:59 AM > > > > > To: Wu, Jingjing ; dev@dpdk.org > > > > > Subject: Re: [dpdk-dev] [PATCH v2 3/5] net/ixgbe: fix bitmask of > > > > > supported Tx flags > > > > > > > > > > Hi Jingjing, > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Wu, Jingjing > > > > > > Sent: Saturday, February 4, 2017 3:36 AM > > > > > > To: dev@dpdk.org > > > > > > Cc: Wu, Jingjing ; Ananyev, Konstantin > > > > > > > > > > > > Subject: [PATCH v2 3/5] net/ixgbe: fix bitmask of supported Tx > > > > > > flags > > > > > > > > > > > > Add missed flags to bitmask of all supported packet Tx flags. > > > > > > > > > > > > CC: konstantin.ananyev@intel.com > > > > > > Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation") > > > > > > Signed-off-by: Jingjing Wu > > > > > > --- > > > > > > drivers/net/ixgbe/ixgbe_rxtx.c | 17 ++++++++++++++++- > > > > > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c > > > > > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 36f1c02..8454581 100644 > > > > > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > > > > > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > > > > > > @@ -81,13 +81,28 @@ > > > > > > #include "ixgbe_rxtx.h" > > > > > > > > > > > > /* Bit Mask to indicate what bits required for building TX > > > > > > context */ > > > > > > +#ifdef RTE_LIBRTE_IEEE1588 > > > > > > #define IXGBE_TX_OFFLOAD_MASK ( \ > > > > > > PKT_TX_VLAN_PKT | \ > > > > > > PKT_TX_IP_CKSUM | \ > > > > > > + PKT_TX_IPV4 | \ > > > > > > PKT_TX_L4_MASK | \ > > > > > > + PKT_TX_IEEE1588_TMST | \ > > > > > > PKT_TX_TCP_SEG | \ > > > > > > PKT_TX_MACSEC | \ > > > > > > - PKT_TX_OUTER_IP_CKSUM) > > > > > > + PKT_TX_OUTER_IP_CKSUM | \ > > > > > > + PKT_TX_OUTER_IPV4) > > > > > > +#else > > > > > > +#define IXGBE_TX_OFFLOAD_MASK ( \ > > > > > > + PKT_TX_VLAN_PKT | \ > > > > > > + PKT_TX_IP_CKSUM | \ > > > > > > + PKT_TX_IPV4 | \ > > > > > > > > > > Wonder why ixgbe doesn't have PKT_TX_IPV6? > > > > > > > > Same question for e1000 and fm10k. > > > > Also if you decided to go that way, you'll probably need to update > > > > TX_OFFLOAD_MASK for enic and vmxnet3. > > > > That's why I still think it would be much less hassle not to includ= e > > > > these flags > > > > (PKT_TX_IPV4 and PKT_TX_IPV6) into TX_OFFLOAD_MASK at all. > > > > Konstantin > > > > > > > > > > > Thanks for pointing that. PKT_TX_IPV6 is missed. > > > About whether include these flags (PKT_TX_IPV4 and PKT_TX_IPV6) into > > > TX_OFFLOAD_MASK, I think they should be Included. Think about one NIC > > may support IPV4 L4 checksum offload, but not support IPV6? Even I don'= t > > know who it is. > > > > > > > I don't think such combination is possible now anyway. > > But ok, if your preference is it to do more work and add (PKT_TX_IPV4 | > > PKT_TX_IPV6) into all required places, I wouldn't argue. > > > > BTW, as a side notice, what will be really good is to have a function t= hat > > would take tx_offload_capabilities as an input and return tx_offload_ma= sk. > > That would remove necessity to update/support TX_OFFLOAD_MASK for > > each PMD, and hopefully will allow to avoid confusion for PMD writers. > > Though that's probably subject of another patch. > > >=20 > OK. I think what I did is more than necessary. Let me simplify the change= . Thanks! >=20 > And about the querying tx offload capabilities, I think it is already bee= n done > In rte_eth_dev_info_get. But it used another set of flags which is not TX= flags > Defined in mbuf. I am not talking about querying device offload capabilities. I am talking about a function that would take these capabilities reported b= y the device and convert them into a set of tx offload flags, that are suitable f= or these capabilities.=20 Something like that: uint64_t tx_capa_to flags(uint32_t tx_capa) { uint64_t ol_flags; =09 ol_flags =3D 0; if (tx_capa & DEV_TX_OFFLOAD_TCP_TSO) ol_flags |=3D PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_IP_CKSUM | PKT_TX_= IPV6; if (tx_capa & DEV_TX_OFFLOAD_TCP_CKSUM) ol_flags |=3D PKT_TX_TCP_CKSUM; ... return ol_flags; } =20 Then PMD writer wouldn't need to define TX_OFFLOAD_MASK for his PMD manuall= y. Instead he can just do at startup/configure phase: txq->tx_offload_mask =3D tx_capa_to flags(supported_and_configured_capabilt= ies); Though, as I said, this is probably subject of another patch/discussion. Konstantin