[dpdk-dev] [PATCH] llib/ibrte_net: workaround to avoid macro conflict

Wu, Jingjing jingjing.wu at intel.com
Thu Oct 9 07:17:31 CEST 2014


Hi, Thomas

The reason why I didn't remover all the macros in rte_ip.h is:

netinet/in.h contains a lot of extra references to the sockets definitions, some external functions declarations, etc. These are useless some DPDK applications, such as classification.
rte_ip.h provides a more simplify way for the IP protocol layer. 

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, September 30, 2014 1:08 PM
> To: Wu, Jingjing
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] llib/ibrte_net: workaround to avoid macro conflict
> 
> Hi Jingjing,
> 
> 2014-09-30 10:49, Jingjing Wu:
> > Macros such as IPPROTO_TCP, IPPROTO_UDP are already defined in <netinet/in.h>.
> > If user's application includes <netinet/in.h> and rte_ip.h at the same time,
> > there will be conflict error.
> >
> > This patch uses the way "#ifndef #endif" to avoid the conflict.
> 
> I still think it is not the good approach.
> 	see http://dpdk.org/ml/archives/dev/2014-August/005006.html
> 	and http://dpdk.org/ml/archives/dev/2014-August/005026.html
> Why not simply remove these definitions?
> 
> --
> Thomas


More information about the dev mailing list