On Mon, 6 Feb 2017 03:02:12 +0000, "Wu, Jingjing" <jingjing...@intel.com> 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