From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail1.empirix.com (bilemail1.empirix.com [208.67.76.245]) by dpdk.org (Postfix) with ESMTP id 4980FC6FA for ; Fri, 31 Jul 2015 17:18:46 +0200 (CEST) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail1.empirix.com (10.17.8.30) with Microsoft SMTP Server (TLS) id 15.0.775.38; Fri, 31 Jul 2015 11:18:27 -0400 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.0775.031; Fri, 31 Jul 2015 11:18:27 -0400 From: "Montorsi, Francesco" To: "dev@dpdk.org" Thread-Topic: conflict between ether_addr defined in rte_ether.h and the same structure in Thread-Index: AdDLo4dIvgAxSFFQQL6bvhoyuKbJDg== Date: Fri, 31 Jul 2015 15:18:26 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.50.109] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [dpdk-dev] conflict between ether_addr defined in rte_ether.h and the same structure in 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: Fri, 31 Jul 2015 15:18:46 -0000 Hi all, I 'm attempting to integrate DPDK code in an existing application, which in= cludes . That standard glibc header already provides a structure named ether_addr de= fined as: struct ether_addr { u_int8_t ether_addr_octet[ETH_ALEN]; } __attribute__ ((__packed__)); So the result is that gcc complains about the redefinition: dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:55:0: warnin= g: "ETHER_ADDR_LEN" redefined [enabled by default] /opt/empirix/toolchains/x86_64-gcc-4.6.1-glibc-2.14-1.0-6/tools/include/net= /ethernet.h:60:0: note: this is the location of the previous definition dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:58:0: warnin= g: "ETHER_HDR_LEN" redefined [enabled by default] /opt/empirix/toolchains/x86_64-gcc-4.6.1-glibc-2.14-1.0-6/tools/include/net= /ethernet.h:63:0: note: this is the location of the previous definition dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:60:0: warnin= g: "ETHER_MIN_LEN" redefined [enabled by default] /opt/empirix/toolchains/x86_64-gcc-4.6.1-glibc-2.14-1.0-6/tools/include/net= /ethernet.h:64:0: note: this is the location of the previous definition dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:61:0: warnin= g: "ETHER_MAX_LEN" redefined [enabled by default] /opt/empirix/toolchains/x86_64-gcc-4.6.1-glibc-2.14-1.0-6/tools/include/net= /ethernet.h:65:0: note: this is the location of the previous definition dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:86:8: error:= redefinition of 'struct ether_addr' /opt/empirix/toolchains/x86_64-gcc-4.6.1-glibc-2.14-1.0-6/tools/include/net= /ethernet.h:33:8: error: previous definition of 'struct ether_addr' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_same_ether_addr(const ether_addr*, const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:112:12: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:112:34: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_zero_ether_addr(const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:131:11: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_unicast_ether_addr(const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:148:15: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_multicast_ether_addr(const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:163:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_universal_ether_addr(const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:196:15: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'int is_local_admin_ether_addr(const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:211:15: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h: In function= 'void ether_format_addr(char*, uint16_t, const ether_addr*)': dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:288:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:289:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:290:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:291:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:292:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' dpdk/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_ether.h:293:14: erro= r: 'const struct ether_addr' has no member named 'addr_bytes' My idea here is that DPDK should rather define an "rte_ether_addr" (or dire= ctly always use but I guess this is not done for some good= reason)... isn't it? Thanks, Francesco Montorsi