[dpdk-dev] [PATCH v2 5/7] fix the Marco conflict

Wu, Jingjing jingjing.wu at intel.com
Thu Aug 28 16:37:20 CEST 2014

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Thursday, August 28, 2014 4:56 PM
> To: Wu, Jingjing
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 5/7] fix the Marco conflict
> 2014-08-28 03:39, Wu, Jingjing:
> > Because these macros such as IPPROTO_TCP, IPPROTO_UDP are already
> > defined in <netinet/in.h>. If user's application include <netinet/in.h>
> > and rte_ip.h at the same time, there will be conflict error, for
> > example cmdline.c in testpmd.
> Yes
> > I remember there was someone also raised this issue few month ago.
> Yes, and the question was: "should we totally remove these definitions"?
> I think yes.
Yes, it will be clear. But it also provides a way to user who doesn't use netinet/in.h.

> > So just use the way "#ifndef #endif" to avoid the conflict.
> But you didn't explain difference between _NETINET_IN_H and _NETINET_IN_H_.

It is due to the different versions of in.h, some use _NETINET_IN_H_ to define the
head file, while some use _NETINET_IN_H
> > And it is exactly workaround as you said.
> Yes, it's a workaround.
> If rte_ip.h is included before netinet/in.h, I think there is still a problem.

Yes, it's just workaround.
As my understanding, in DPDK's source code
System head files includes first should be as following. So I think it's OK then.
> --
> Thomas

Can I send a separate patch for this? Because it has no strict relationship with flow director.


More information about the dev mailing list