User applications and DPDK libraries should detect the NEON by the RTE_MACHINE_CPUFLAG_NEON. It guarantees that the arm_neon.h is present.
Signed-off-by: Jan Viktorin <viktorin at rehivetech.com> --- examples/l3fwd/l3fwd_em.c | 2 +- lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 0adf8f4..4983eed 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -250,7 +250,7 @@ em_mask_key(void *key, xmm_t mask) return _mm_and_si128(data, mask); } -#elif defined(__ARM_NEON) +#elif defined(RTE_MACHINE_CPUFLAG_NEON) static inline xmm_t em_mask_key(void *key, xmm_t mask) { diff --git a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h index df47c0d..ad8bc65 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h +++ b/lib/librte_eal/common/include/arch/arm/rte_memcpy_32.h @@ -42,7 +42,7 @@ extern "C" { #include "generic/rte_memcpy.h" -#ifdef __ARM_NEON_FP +#ifdef RTE_MACHINE_CPUFLAG_NEON /* ARM NEON Intrinsics are used to copy data */ #include <arm_neon.h> @@ -325,7 +325,7 @@ rte_memcpy_func(void *dst, const void *src, size_t n) return memcpy(dst, src, n); } -#endif /* __ARM_NEON_FP */ +#endif /* RTE_MACHINE_CPUFLAG_NEON */ #ifdef __cplusplus } -- 2.7.0