From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B41B6F72 for ; Sun, 5 Feb 2017 11:28:39 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 05 Feb 2017 02:28:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,338,1477983600"; d="scan'208";a="817248734" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.186.67]) ([10.254.186.67]) by FMSMGA003.fm.intel.com with ESMTP; 05 Feb 2017 02:28:37 -0800 To: Jingjing Wu , dev@dpdk.org References: <1485258650-86193-1-git-send-email-jingjing.wu@intel.com> <1486179375-133509-1-git-send-email-jingjing.wu@intel.com> <1486179375-133509-3-git-send-email-jingjing.wu@intel.com> Cc: helin.zhang@intel.com From: Ferruh Yigit Message-ID: Date: Sun, 5 Feb 2017 10:28:36 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1486179375-133509-3-git-send-email-jingjing.wu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 2/5] net/i40e: 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: Sun, 05 Feb 2017 10:28:40 -0000 On 2/4/2017 3:36 AM, Jingjing Wu wrote: > Some Tx offload flags are missed in bitmask of all supported packet > Tx flags by i40e. > This patch fixes it. > > CC: helin.zhang@intel.com > Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation") > Signed-off-by: Jingjing Wu > --- > drivers/net/i40e/i40e_rxtx.c | 36 ++++++++++++++++++++++++++++-------- > 1 file changed, 28 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 608685f..4dd45f3 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -80,15 +80,35 @@ > PKT_TX_L4_MASK | \ > PKT_TX_TCP_SEG | \ > PKT_TX_OUTER_IP_CKSUM) > +#ifdef RTE_LIBRTE_IEEE1588 > +#define I40E_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_IEEE1588_TMST | \ > + PKT_TX_TCP_SEG | \ > + PKT_TX_QINQ_PKT | \ > + PKT_TX_VLAN_PKT | \ > + PKT_TX_TUNNEL_MASK) > +#else > +#define I40E_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 | \ > + PKT_TX_TUNNEL_MASK) Functionally will be same, but what do you think about following, to make easy to see what define adds: +#define I40E_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 | \ +#ifdef RTE_LIBRTE_IEEE1588 + PKT_TX_IEEE1588_TMST | \ +#endif + PKT_TX_TCP_SEG | \ + PKT_TX_QINQ_PKT | \ + PKT_TX_VLAN_PKT | \ + PKT_TX_TUNNEL_MASK) > > -#define I40E_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) > - > +#endif > #define I40E_TX_OFFLOAD_NOTSUP_MASK \ > (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK) > >