[dpdk-stable] [PATCH 20.11] config/arm: replace native machine args

Ruifeng Wang Ruifeng.Wang at arm.com
Sat Feb 20 04:42:45 CET 2021


> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes at pantheon.tech>
> Sent: Friday, February 19, 2021 8:10 PM
> To: Luca Boccassi <bluca at debian.org>; stable at dpdk.org
> Cc: jerinj at marvell.com; Ruifeng Wang <Ruifeng.Wang at arm.com>;
> david.marchand at redhat.com
> Subject: RE: [PATCH 20.11] config/arm: replace native machine args
> 
> 
> 
> > -----Original Message-----
> > From: Luca Boccassi <bluca at debian.org>
> > Sent: Friday, February 19, 2021 12:33 PM
> > To: Juraj Linkeš <juraj.linkes at pantheon.tech>; stable at dpdk.org
> > Cc: jerinj at marvell.com; ruifeng.wang at arm.com;
> > david.marchand at redhat.com
> > Subject: Re: [PATCH 20.11] config/arm: replace native machine args
> >
> > On Fri, 2021-02-19 at 11:06 +0000, Juraj Linkeš wrote:
> > > > -----Original Message-----
> > > > From: luca.boccassi at gmail.com <luca.boccassi at gmail.com>
> > > > Sent: Friday, February 19, 2021 11:58 AM
> > > > To: stable at dpdk.org
> > > > Cc: Juraj Linkeš <juraj.linkes at pantheon.tech>; jerinj at marvell.com;
> > > > ruifeng.wang at arm.com; david.marchand at redhat.com
> > > > Subject: [PATCH 20.11] config/arm: replace native machine args
> > > >
> > > > From: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > > >
> > > > [ backported from upstream commit
> > > > 9186e5a07f35ae74a1f7fa2d89671b5f77eae407 ]
> > > >
> > > > There are compiler issues when building with -mcpu=native with
> > > > popular compilers, such as GCC-8.4:
> > > > In file included from ../lib/librte_eal/arm/include/rte_vect.h:11,
> > > >                  from ../lib/librte_net/net_crc_neon.c:10:
> > > > ../lib/librte_net/net_crc_neon.c: In function ‘crcr32_folding_round’:
> > > > /usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: error:
> > > > inlining failed in call to always_inline ‘vmull_p64’:
> > > > target specific option mismatch
> > > >  vmull_p64 (poly64_t a, poly64_t b)
> > > > ../lib/librte_net/net_crc_neon.c:50:20: note: called from here
> > > >   uint64x2_t tmp1 = vreinterpretq_u64_p128(vmull_p64(
> > > >     vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0),
> > > >     vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1)));
> > > >
> > > > and clang:
> > > > gcc -E -dM -mcpu="native" - < /dev/null | grep
> > > > __ARM_FEATURE_ATOMICS
> > > > clang-9 -E -dM -mcpu="native" - < /dev/null | grep
> > > > __ARM_FEATURE_ATOMICS <no output> # no clang support
> > > >
> > > > Fix this by always specifying the proper machine args and never
> > > > using the native flags.
> > > >
> > > > Fixes: 78ac8eac7e8a ("config/arm: use native machine build
> > > > arguments")
> > > >
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > > > Signed-off-by: Luca Boccassi <luca.boccassi at microsoft.com>
> > > > ---
> > > > This is a crude backport, but it fixes the build for arm64. It's a
> > > > release blocker for 20.11.1, so I would appreciate a quick review.
> > > > Thanks!
> > >
> > > What does this fix? With or without the below change, the native
> > > machine
> > args are not used. The patch shoudn't actually change the
> > configuration of the build at all, so I'm a bit confused.
> >
> > It fixes the build on some build workers with thunderx hardware -
> > without this I get failures like:
> >
> > arm_neon.h:26647:1: error: inlining failed in call to 'always_inline'
> > 'vmull_p64': target specific option mismatch
> >
> 
> I tried the patch and I'm seeing the same errors on a ThunderX server (with
> and without the patch). Is this actually the right patch?
> 
> One of the four failures looks like this:
> In file included from ../lib/librte_eal/arm/include/rte_vect.h:11,
>                  from ../lib/librte_net/net_crc_neon.c:10:
> ../lib/librte_net/net_crc_neon.c: In function 'crcr32_folding_round':
> /usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: error: inlining
> failed in call to always_inline 'vmull_p64': target specific option mismatch
>  vmull_p64 (poly64_t a, poly64_t b)
>  ^~~~~~~~~
> ../lib/librte_net/net_crc_neon.c:50:20: note: called from here
>   uint64x2_t tmp1 = vreinterpretq_u64_p128(vmull_p64(
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0),
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1)));
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Ruifeng, any ideas on how to fix this?

Gcc build on ThunderX platform is broken. Issue can be seen in some CentOS-8 OBS builds.
https://mails.dpdk.org/archives/dev/2020-November/192909.html
I tried tuning compiler flags used, but could not resolve the issue.

Need help from Marvell to look at this.
Hi Jerin, do you have any thoughts on this?
> 
> > --
> > Kind regards,
> > Luca Boccassi



More information about the stable mailing list