[dpdk-dev] eal/arm64: fix instrinsic for ARM64 NEON with GCC < 4.9

Message ID 20180131000708.32562-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yongseok Koh Jan. 31, 2018, 12:07 a.m. UTC
  vceqzq_u32() is being used by mlx5 PMD but added since gcc 4.9.

Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 lib/librte_eal/common/include/arch/arm/rte_vect.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Jerin Jacob Jan. 31, 2018, 5:42 a.m. UTC | #1
-----Original Message-----
> Date: Tue, 30 Jan 2018 16:07:08 -0800
> From: Yongseok Koh <yskoh@mellanox.com>
> To: jerin.jacob@caviumnetworks.com, jianbo.liu@arm.com
> CC: dev@dpdk.org, Yongseok Koh <yskoh@mellanox.com>, stable@dpdk.org
> Subject: [PATCH] eal/arm64: fix instrinsic for ARM64 NEON with GCC < 4.9
> X-Mailer: git-send-email 2.11.0
> 
> vceqzq_u32() is being used by mlx5 PMD but added since gcc 4.9.
> 
> Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  lib/librte_eal/common/include/arch/arm/rte_vect.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> index 5cc34190f..2a18a6854 100644
> --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
> +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> @@ -78,6 +78,12 @@ vcopyq_laneq_u32(uint32x4_t a, const int lane_a,
>  typedef uint64_t poly64_t;
>  typedef uint64x2_t poly64x2_t;
>  typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16)));
> +
> +static inline uint32x4_t
> +vceqzq_u32(uint32x4_t a)
> +{
> +	return (a == 0);
> +}
>  #endif
>  
>  /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */
> -- 
> 2.11.0
>
  
Thomas Monjalon Jan. 31, 2018, 11:21 a.m. UTC | #2
> > vceqzq_u32() is being used by mlx5 PMD but added since gcc 4.9.
> > 
> > Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
index 5cc34190f..2a18a6854 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
@@ -78,6 +78,12 @@  vcopyq_laneq_u32(uint32x4_t a, const int lane_a,
 typedef uint64_t poly64_t;
 typedef uint64x2_t poly64x2_t;
 typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16)));
+
+static inline uint32x4_t
+vceqzq_u32(uint32x4_t a)
+{
+	return (a == 0);
+}
 #endif
 
 /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */