From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by dpdk.org (Postfix) with ESMTP id A3FF8569A for ; Tue, 6 Jan 2015 12:35:49 +0100 (CET) Received: by mail-we0-f172.google.com with SMTP id k11so9454249wes.3 for ; Tue, 06 Jan 2015 03:35:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=6Rji5XisM6HOLFk4bql1SglPlWfS09ZBDnbg5iqyUmk=; b=jk5WpVdt+jTgBqz7baDrcZFFXlYjQ7gqruFtT4c7tKzYUjJZMi0tSO8JwaUd2Jhq4b 12kGmoOhxvLhnHVGrd70uOqvmj5H6Rs3W+5kA4a1OtHjTrYXQOn3S4ZvqWCkepL3vzh8 cAKWxGuCukPGdSAOFHvPrxvqM+apk7fM93+z2ay83WySZ2h/pIE/K8T8/apTpuCvX9/n KtHSVbdxfW+wveYTRu6DEvzeDFob5YDJCTuf6pvyy9PqeXFwtjAmqRHKwZqjceHywNcy VhMAPfBTPtIcFqK0o67NXIcecw7d95v9ZENY/DJ5kfwdu6Q5yUwRR4cXFKtMCZQe8HrM 3hdw== X-Gm-Message-State: ALoCoQlojY1O+YHocO5FUED7U6pBC7RMd76vGrhQHy/XKQoKUCtv/sHwKrrxGMNauMq03nIrBfl5 X-Received: by 10.180.221.201 with SMTP id qg9mr36210771wic.29.1420544149355; Tue, 06 Jan 2015 03:35:49 -0800 (PST) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id wz5sm79087371wjc.29.2015.01.06.03.35.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jan 2015 03:35:48 -0800 (PST) From: Thomas Monjalon To: Stephen Hemminger Date: Tue, 06 Jan 2015 11:44:16 +0100 Message-ID: <6701277.4xurLSZEjD@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.6-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <20141227151300.7b62f5bf@urahara> References: <20141227151300.7b62f5bf@urahara> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC] resolve conflict between net/ethernet.h and rte_ethdev.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 11:35:49 -0000 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. -- Thomas