[dpdk-dev] [RFC] resolve conflict between net/ethernet.h and rte_ethdev.h

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Mar 5 00:16:02 CET 2015


2015-01-06 11:44, Thomas Monjalon:
> 2014-12-27 15:13, Stephen Hemminger:
> > This is a patch to address the conflict between <net/ethernet.h>
> > and the definitions in <rte_ethdev.h>. It has two side effects
> > worth discussion:
> >   1. It forces inclusion of net/ethernet.h
> >   2. It has definition to deal with the differing structure elements
> >      in the two versions of struct ether_addr.
> > 
> > By doing this ether_ntoa and related functions can be used without
> > messing with prototypes.
> > 
> > Alternative is more complex #ifdef magic like linux/libc-compat.h
> 
> [...]
> 
> > +#include <net/ethernet.h>
> 
> [...]
> 
> > +/* Deprecated definition to allow for compatiablity with net/ethernet.h */
> > +#define addr_bytes	ether_addr_octet
> 
> This is defining a common identifier without prefix.
> So it will be forbidden to use addr_bytes as variable name.
> I understand you are trying to keep compatibility with both structures,
> but the drawback is really nasty.
> Is there another solution? Or at least, we could mark it as deprecated and
> remove it in release 2.1.

ping
Any opinion?



More information about the dev mailing list