From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v2 2/5] net/i40e: fix bitmask of supported Tx flags Date: Mon, 6 Feb 2017 11:28:38 +0100 Message-ID: <20170206112838.528745e8@platinum> 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> <9BB6961774997848B5B42BEC655768F810CD4D95@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Yigit, Ferruh" , "dev@dpdk.org" , "Zhang, Helin" To: "Wu, Jingjing" Return-path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 6A89114EC for ; Mon, 6 Feb 2017 11:28:41 +0100 (CET) Received: by mail-wr0-f177.google.com with SMTP id i10so21215690wrb.0 for ; Mon, 06 Feb 2017 02:28:41 -0800 (PST) In-Reply-To: <9BB6961774997848B5B42BEC655768F810CD4D95@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 6 Feb 2017 03:02:12 +0000, "Wu, Jingjing" wrote: > > > > 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) > > > > Hi, Ferruh > > As I know, the above change is incorrect in C code. We cannot use > #ifdef #endif inside #define > > Thanks > Jingjing You can do: #ifdef RTE_LIBRTE_IEEE1588 #define I40_TX_IEEE1588_TMST PKT_TX_IEEE1588_TMST #else #define I40_TX_IEEE1588_TMST 0 #endif #define I40E_TX_OFFLOAD_MASK ( \ I40_TX_IEEE1588_TMST | \ PKT_TX_IP_CKSUM | \ ... Regards, Olivier