Message ID | 1458524684-13539-1-git-send-email-yong.liu@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D83D4275D; Mon, 21 Mar 2016 02:44:53 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9782BB62 for <dev@dpdk.org>; Mon, 21 Mar 2016 02:44:51 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 20 Mar 2016 18:44:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,368,1455004800"; d="scan'208";a="70096195" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 20 Mar 2016 18:44:50 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u2L1imH2032174; Mon, 21 Mar 2016 09:44:48 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2L1ijVo013575; Mon, 21 Mar 2016 09:44:47 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u2L1ijP1013571; Mon, 21 Mar 2016 09:44:45 +0800 From: Marvin Liu <yong.liu@intel.com> To: dev@dpdk.org Cc: Marvin Liu <yong.liu@intel.com> Date: Mon, 21 Mar 2016 09:44:44 +0800 Message-Id: <1458524684-13539-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Marvin Liu
March 21, 2016, 1:44 a.m. UTC
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 <yong.liu@intel.com>
Comments
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marvin Liu >Sent: Monday, March 21, 2016 2:45 AM >To: dev@dpdk.org >Cc: Liu, Yong <yong.liu@intel.com> >Subject: [dpdk-dev] [PATCH] testpmd: fix build on FreeBSD > >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 <yong.liu@intel.com> Acked-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
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 <yong.liu@intel.com> > > 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; > }
> -----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 <yong.liu@intel.com> > > > > 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? Thanks, Pablo
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 <yong.liu@intel.com> > > > > > > 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
Hi Pablo & Sergio, > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Monday, March 21, 2016 5:40 PM > To: Gonzalez Monroy, Sergio; Liu, Yong; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] testpmd: fix build on FreeBSD > > > > > -----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 <yong.liu@intel.com> > > > > > > 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? > > Because of structures between BSD an Linux have different names. On linux, it will be "__in6_u. __u6_addr32". > > Sergio > > > > > } > > > tunnel_filter_conf.ip_type = RTE_TUNNEL_IPTYPE_IPV6; > > > } > > Also, can you include the missing "Fixes" line? > Sure, I will add it and send out v2. > Thanks, > Pablo Best regards, Marvin
On 22/03/2016 03:30, Liu, Yong wrote: > Hi Pablo & Sergio, > >> -----Original Message----- >> From: De Lara Guarch, Pablo >> Sent: Monday, March 21, 2016 5:40 PM >> To: Gonzalez Monroy, Sergio; Liu, Yong; dev@dpdk.org >> Subject: RE: [dpdk-dev] [PATCH] testpmd: fix build on FreeBSD >> >> >> >>> -----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 <yong.liu@intel.com> >>>> >>>> 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? >>> > Because of structures between BSD an Linux have different names. > On linux, it will be "__in6_u. __u6_addr32". Duh! Sorry about that. I should drink coffee before replying emails. Sergio >>> Sergio >>> >>>> } >>>> tunnel_filter_conf.ip_type = RTE_TUNNEL_IPTYPE_IPV6; >>>> } >> Also, can you include the missing "Fixes" line? >> > Sure, I will add it and send out v2. > >> Thanks, >> Pablo > Best regards, > Marvin >
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 } tunnel_filter_conf.ip_type = RTE_TUNNEL_IPTYPE_IPV6; }