From: Gowrishankar Muthukrishnan Date: Thu, 8 Sep 2016 16:48:05 +0000 (+0530) Subject: examples/l3fwd: add AltiVec for ppc64 X-Git-Tag: spdx-start~6019 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f2379ca1f679c1ded6ed2239fc3b7f58844d903b;p=dpdk.git examples/l3fwd: add AltiVec for ppc64 This patch adds ppc64le port for em_mask_key function. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Chao Zhu --- diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index def5a02428..6053a6277c 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -259,8 +259,16 @@ em_mask_key(void *key, xmm_t mask) return vandq_s32(data, mask); } +#elif defined(RTE_MACHINE_CPUFLAG_ALTIVEC) +static inline xmm_t +em_mask_key(void *key, xmm_t mask) +{ + xmm_t data = vec_ld(0, (xmm_t *)(key)); + + return vec_and(data, mask); +} #else -#error No vector engine (SSE, NEON) available, check your toolchain +#error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain #endif static inline uint8_t