Thread (5 messages) 5 messages, 2 authors, 2021-02-02

Re: [dpdk-dev] [RFC PATCH v1] config/arm: fix native machine args

From: Juraj Linkeš <hidden>
Date: 2021-02-02 07:40:55

-----Original Message-----
From: Thomas Monjalon <redacted>
Sent: Monday, February 1, 2021 4:16 PM
To: Juraj Linkeš <redacted>
Cc: bruce.richardson@intel.com; Ruifeng.Wang@arm.com;
Honnappa.Nagarahalli@arm.com; jerinjacobk@gmail.com;
ferruh.yigit@intel.com; dev@dpdk.org
Subject: Re: [RFC PATCH v1] config/arm: fix native machine args

01/02/2021 15:55, Juraj Linkeš:
quoted
There are compiler issues when building with -mcpu=native with popular
compilers, such as GCC-8.4 and clang (which doesn't define
__ARM_FEATURE_ATOMIC).
What are the issues? Maybe worth pasting a log.
I can include this in the commit log from GCC-8.4 (the same thing works with GCC-10.2):
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 for clang:
gcc -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
#define __ARM_FEATURE_ATOMICS 1 # gcc support
clang-9 -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
<no output> # clang no support
quoted
Fix this by always specifying the proper machine args and never using
the native flags.
The title says "fix" but it seems to be "remove".
Yes. The fix is to remove the usage of native flags and instead always use the part_number flags.
[...]
quoted
-native_machine_args = ['-mcpu=native']
This is the culprit?
Could you provide a "Fixes:" line?
There already is one:
Fixes: 78ac8eac7e8a ("config/arm: use native machine build arguments")
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help