From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [RFC] resolve conflict between net/ethernet.h and rte_ethdev.h Date: Thu, 05 Mar 2015 00:16:02 +0100 Message-ID: <8562501.9F7O0EyhDp@xps13> References: <20141227151300.7b62f5bf@urahara> <6701277.4xurLSZEjD@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Stephen Hemminger Return-path: In-Reply-To: <6701277.4xurLSZEjD@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-01-06 11:44, Thomas Monjalon: > 2014-12-27 15:13, Stephen Hemminger: > > This is a patch to address the conflict between > > and the definitions in . 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 > > [...] > > > +/* 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?