From c2e724b68b23dc56808e74cd5e4d90d5e01683dc Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Thu, 30 Jan 2020 19:12:59 +0100 Subject: [HICN-497] Fixed wrong alignement in the matching function Change-Id: I8115fd1be93477811e349d13ab5e3aaaff1880c7 Signed-off-by: Alberto Compagno --- hicn-plugin/src/faces/app/face_prod_node.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'hicn-plugin/src') diff --git a/hicn-plugin/src/faces/app/face_prod_node.c b/hicn-plugin/src/faces/app/face_prod_node.c index e2967bf39..0ef25fe94 100644 --- a/hicn-plugin/src/faces/app/face_prod_node.c +++ b/hicn-plugin/src/faces/app/face_prod_node.c @@ -89,14 +89,9 @@ match_ip6_name (u8 * name, fib_prefix_t * prefix) u32 as_u32[4]; } xor_sum __attribute__ ((aligned (sizeof (u32x4)))); -#ifdef CLIB_HAVE_VEC128 - u32x4u *data = (u32x4u *)name; - xor_sum.as_u32x4 = *(data) & - UNION_CAST (prefix->fp_addr.ip6.as_u64[0], u32x4); -#else - xor_sum.as_u64[0] = ((u64 *) name)[0] & prefix->fp_addr.ip6.as_u64[0]; - xor_sum.as_u64[1] = ((u64 *) name)[1] & prefix->fp_addr.ip6.as_u64[1]; -#endif /* CLIB_HAVE_VEC128 */ + xor_sum.as_u64[0] = ((u64 *) name)[0] & prefix->fp_addr.ip6.as_u64[0]; + xor_sum.as_u64[1] = ((u64 *) name)[1] & prefix->fp_addr.ip6.as_u64[1]; + return (xor_sum.as_u64[0] == prefix->fp_addr.ip6.as_u64[0]) && (xor_sum.as_u64[1] == prefix->fp_addr.ip6.as_u64[1]); } -- cgit 1.2.3-korg