diff options
author | Mauro Sardara <msardara@cisco.com> | 2020-01-30 18:24:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2020-01-30 18:24:58 +0000 |
commit | 0c952f05e88d4426e05072e4759c84af05c03d01 (patch) | |
tree | 7d683fab3eeaf707f86215b5f3991cc4509931a0 /hicn-plugin/src | |
parent | d013cc961c1007cd6e4cfa26cfcb453cfbb4d4e9 (diff) | |
parent | c2e724b68b23dc56808e74cd5e4d90d5e01683dc (diff) |
Merge "[HICN-497] Fixed wrong alignement in the matching function"
Diffstat (limited to 'hicn-plugin/src')
-rw-r--r-- | hicn-plugin/src/faces/app/face_prod_node.c | 11 |
1 files changed, 3 insertions, 8 deletions
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]); } |