summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/app/face_prod_node.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-01-30 19:12:59 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-01-30 19:12:59 +0100
commitc2e724b68b23dc56808e74cd5e4d90d5e01683dc (patch)
treee6db3fc2edfb07cd5dbd927882c021ea291ba84a /hicn-plugin/src/faces/app/face_prod_node.c
parentf1e21ec5c9e0d2ce070a5ae9331617236e7088a4 (diff)
[HICN-497] Fixed wrong alignement in the matching function
Change-Id: I8115fd1be93477811e349d13ab5e3aaaff1880c7 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/app/face_prod_node.c')
-rw-r--r--hicn-plugin/src/faces/app/face_prod_node.c11
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]);
}