From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 3B8492BF5 for ; Thu, 26 Jan 2017 16:57:54 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id r144so91420703wme.1 for ; Thu, 26 Jan 2017 07:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=078kbrnrZVPeZlnRLjBIbKEeI+pR7WX3kIiK5kc0k2k=; b=2CEMwsDD9PzaE0TAjne+GT3HYvEmATQAmKwpzRic+BQxBYmDNosSAvq9pWraiR7fdA bvsByhTaS3l3Qmvu0riFEwWf6M3xmilpL6fMRpnp7OoOHWtIZLvTHVZVsY+cymeH2050 sHztiP9PK6E+9tqAMiT6ctsZQQzJI1FO9NicNQLYF/WmrB8dqw7DtolTgWHDhjFUrN6T aCp6mwpIafFEsywHBtiG5+97Zw7y4pXPGg7rp2iTxLaqBPM3Ogr3v5fs0bxj9AIXIE/i Eviey4iS0vDJMf7YblRVVwoOhYq43AcBE9TFsm8/kr7mBcriM8igKNSd6BxIZ/74wvtA 5HeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=078kbrnrZVPeZlnRLjBIbKEeI+pR7WX3kIiK5kc0k2k=; b=tHrhsuQOvVH+jPz2PF48nP/51SHOXWgPAlPu1IMuIsr+TonTOceMzKA8ql3SwOuqa/ GJ2V0ry4gsvrVQyxjmGW17WkzW+D5CF5bNuFuT9LNnbczU2xIxaFsE2f2AKIsUTjIrOA wPRcQ9OlnBBbRwQf1ipMd56I9voBMunHJFM2fMKX2maMRTFJoI30kSW2wF4TP+Mo8A1L EmILhrPe5QTmudpRN/DJxvsg/JPlrcU3U/auFpGMsgbg6w0kKMF10E0KJ2f+NZr9ofuo q82dUnXoKKDrVbagnscC2WOvuK7W9YMWkqNYN8jSvyZmr37yR+MtR273Ik73+En4gwzR cvlA== X-Gm-Message-State: AIkVDXLAbJsKqeCXioIleeBCXVn6iVTde+iwSkLtQLC+LaUl8837DyhghVUyIA1nFR1CvML+ X-Received: by 10.28.131.72 with SMTP id f69mr3573133wmd.140.1485446274678; Thu, 26 Jan 2017 07:57:54 -0800 (PST) Received: from glumotte.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id w126sm3782715wmw.0.2017.01.26.07.57.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jan 2017 07:57:54 -0800 (PST) From: Olivier MATZ X-Google-Original-From: Olivier MATZ Date: Thu, 26 Jan 2017 16:57:47 +0100 To: "Ananyev, Konstantin" Cc: Olivier MATZ , "Wu, Jingjing" , "dev@dpdk.org" Message-ID: <20170126165747.09ac480c@glumotte.dev.6wind.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772583F10D10F@irsmsx105.ger.corp.intel.com> References: <1485258454-86107-1-git-send-email-jingjing.wu@intel.com> <2601191342CEEE43887BDE71AB9772583F10D0CB@irsmsx105.ger.corp.intel.com> <20170126160516.398ac002@glumotte.dev.6wind.com> <2601191342CEEE43887BDE71AB9772583F10D10F@irsmsx105.ger.corp.intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload 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: Thu, 26 Jan 2017 15:57:55 -0000 On Thu, 26 Jan 2017 15:35:29 +0000, "Ananyev, Konstantin" wrote: > Hi Olivier, > > > -----Original Message----- > > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > > Sent: Thursday, January 26, 2017 3:05 PM > > To: Ananyev, Konstantin > > Cc: Wu, Jingjing ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload > > flags > > > > On Thu, 26 Jan 2017 14:58:08 +0000, "Ananyev, Konstantin" > > wrote: > > > Hi Jingjng, > > > > > > > -----Original Message----- > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jingjing Wu > > > > Sent: Tuesday, January 24, 2017 11:48 AM > > > > To: dev@dpdk.org > > > > Cc: Wu, Jingjing > > > > Subject: [dpdk-dev] [PATCH 1/2] mbuf: fix bitmask of Tx offload > > > > flags > > > > > > > > Some Tx offload flags are missed in Bitmask of all supported > > > > packet Tx offload features flags. > > > > This patch fixes it. > > > > > > Not sure what it exactly fixes? > > > As I remember these flags don't specify any TX offload for HW to > > > perform, But just provide information to the TX function. > > > Again, why only i40e code is modified? > > > As I remember we have the same code in other PMDs too. > > > Konstantin > > > > > > > > > > > Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation") > > > > Signed-off-by: Jingjing Wu > > > > --- > > > > lib/librte_mbuf/rte_mbuf.h | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/lib/librte_mbuf/rte_mbuf.h > > > > b/lib/librte_mbuf/rte_mbuf.h index bfce9f4..e57a4d2 100644 > > > > --- a/lib/librte_mbuf/rte_mbuf.h > > > > +++ b/lib/librte_mbuf/rte_mbuf.h > > > > @@ -295,8 +295,12 @@ extern "C" { > > > > */ > > > > #define PKT_TX_OFFLOAD_MASK ( \ > > > > PKT_TX_IP_CKSUM | \ > > > > + PKT_TX_IPV4 | \ > > > > + PKT_TX_IPV6 | \ > > > > PKT_TX_L4_MASK | \ > > > > PKT_TX_OUTER_IP_CKSUM | \ > > > > + PKT_TX_OUTER_IPV4 | \ > > > > + PKT_TX_OUTER_IPV6 | \ > > > > PKT_TX_TCP_SEG | \ > > > > PKT_TX_QINQ_PKT | \ > > > > PKT_TX_VLAN_PKT | \ > > > > -- > > > > 2.4.11 > > > > > > > Also, it looks like MACSEC is missing. To avoid forgetting flags in > > the future, what do you think about doing the following (not > > tested)? > > > > > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index b3cccfc..aa1dc76 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -182,9 +182,11 @@ extern "C" { > > */ > > #define PKT_RX_TIMESTAMP (1ULL << 17) > > > > -/* add new RX flags here */ > > +/* add new RX flags here, and update __PKT_RX_NEXT */ > > +#define __PKT_RX_NEXT (1ULL << 18) > > > > -/* add new TX flags here */ > > +/* add new TX flags here, and update __PKT_TX_NEXT */ > > +#define __PKT_TX_NEXT (1ULL << 43) > > > > /** > > * Offload the MACsec. This flag must be set by the application to > > enable @@ -295,17 +297,16 @@ extern "C" { > > #define PKT_TX_OUTER_IPV6 (1ULL << 60) > > > > /** > > + * Bitmask of all supported packet Rx offload features flags, > > + * which can be set for packet. > > + */ > > +#define PKT_RX_OFFLOAD_MASK (__PKT_RX_NEXT - 1) > > + > > +/** > > * Bitmask of all supported packet Tx offload features flags, > > * which can be set for packet. > > */ > > -#define PKT_TX_OFFLOAD_MASK ( \ > > - PKT_TX_IP_CKSUM | \ > > - PKT_TX_L4_MASK | \ > > - PKT_TX_OUTER_IP_CKSUM | \ > > - PKT_TX_TCP_SEG | \ > > - PKT_TX_QINQ_PKT | \ > > - PKT_TX_VLAN_PKT | \ > > - PKT_TX_TUNNEL_MASK) > > +#define PKT_TX_OFFLOAD_MASK ((~(__PKT_TX_NEXT - 1)) & > > 0x1fffffffffffffff) > > I see your point but should, let say, PKT_TX_IPV4 be part of > PKT_TX_OFFLOAD_MASK at all? It doesn't really define any offload for > PMD/HW to perform. It just provide extra information for PMD so it > can successfully process other offload requests. Konstantin Yes, that's right. On the other hand, differentiating them may confuse the PMD developpers (that's probably the case for this patch). Having PKT_TX_MASK that includes all TX flags automatically would also do the job (knowing PMDs must be updated), and would avoid to forget flags in the future... if we decide to do it, it would be better before 17.02, because PKT_TX_OFFLOAD_MASK was added after 16.11, so it is not yet part of the API. In any case, we need a patch to fix the missing PKT_TX_MACSEC in PKT_TX_OFFLOAD_MASK.