From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Montorsi, Francesco" Subject: conflict between ether_addr defined in rte_ether.h and the same structure in Date: Fri, 31 Jul 2015 15:18:26 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "dev@dpdk.org" 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) Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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