From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 090722C65 for ; Mon, 21 Mar 2016 15:57:39 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 21 Mar 2016 07:57:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,372,1455004800"; d="scan'208";a="70437906" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.10]) by fmsmga004.fm.intel.com with SMTP; 21 Mar 2016 07:57:33 -0700 Received: by (sSMTP sendmail emulation); Mon, 21 Mar 2016 14:57:33 +0025 Date: Mon, 21 Mar 2016 14:57:33 +0000 From: Bruce Richardson To: "De Lara Guarch, Pablo" Cc: "Gonzalez Monroy, Sergio" , "Liu, Yong" , "dev@dpdk.org" Message-ID: <20160321145732.GB16732@bricha3-MOBL3> References: <1458524684-13539-1-git-send-email-yong.liu@intel.com> <56EFBB35.6080901@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] testpmd: fix build on FreeBSD 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: Mon, 21 Mar 2016 14:57:40 -0000 On Mon, Mar 21, 2016 at 09:40:07AM +0000, De Lara Guarch, Pablo wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez > > Monroy > > Sent: Monday, March 21, 2016 9:13 AM > > To: Liu, Yong; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] testpmd: fix build on FreeBSD > > > > On 21/03/2016 01:44, Marvin Liu wrote: > > > Build log: > > > /root/dpdk/app/test-pmd/cmdline.c:6687:45: error: no member named > > > 's6_addr32' in 'struct in6_addr' > > > rte_be_to_cpu_32(res->ip_value.addr.ipv6.s6_addr32[i]); > > > > > > This is caused by macro "s6_addr32" not defined on FreeBSD. > > > > > > Signed-off-by: Marvin Liu > > > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > > > index 9d52b8c..51ad23b 100644 > > > --- a/app/test-pmd/cmdline.c > > > +++ b/app/test-pmd/cmdline.c > > > @@ -6684,7 +6684,11 @@ cmd_tunnel_filter_parsed(void *parsed_result, > > > int i; > > > for (i = 0; i < 4; i++) { > > > tunnel_filter_conf.ip_addr.ipv6_addr[i] = > > > +#ifdef RTE_EXEC_ENV_BSDAPP > > > + rte_be_to_cpu_32(res- > > >ip_value.addr.ipv6.__u6_addr.__u6_addr32[i]); > > > +#else > > > rte_be_to_cpu_32(res- > > >ip_value.addr.ipv6.s6_addr32[i]); > > > +#endif > > > > Why not always use .__u6_addr.__u6_addr32[i] and avoid ifdef? > > > > Sergio > > > > > } > > > tunnel_filter_conf.ip_type = RTE_TUNNEL_IPTYPE_IPV6; > > > } > > Also, can you include the missing "Fixes" line? > A slightly higher level question: Why are we doing 32-bit endian conversions, when IPv6 addresses are normally specified in 16-bit (4-hex digit) blocks? /Bruce