diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-11 09:57:58 +0100 |
---|---|---|
committer | Aberto Compagno <acompagn+fdio@cisco.com> | 2020-01-30 08:21:50 +0000 |
commit | 38682396416f315fb5c5b0f8c25beb7a6a909d4f (patch) | |
tree | 9b56f4835a8936252f87bc19a27432b4bb8587c0 /hicn-plugin/src/faces/app/face_prod_node.c | |
parent | fa11d711aaab5e4cba7e89dcc896866f3e73db3f (diff) |
[HICN-445] Update to vpp 20.01
Change-Id: I19a442080b6ca8b0477a8f92f161282288c395ee
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.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/hicn-plugin/src/faces/app/face_prod_node.c b/hicn-plugin/src/faces/app/face_prod_node.c index 48e7c4259..e2967bf39 100644 --- a/hicn-plugin/src/faces/app/face_prod_node.c +++ b/hicn-plugin/src/faces/app/face_prod_node.c @@ -80,7 +80,7 @@ match_ip4_name (u32 * name, fib_prefix_t * prefix) } static_always_inline int -match_ip6_name (u32x4 * name, fib_prefix_t * prefix) +match_ip6_name (u8 * name, fib_prefix_t * prefix) { union { @@ -90,18 +90,13 @@ match_ip6_name (u32x4 * name, fib_prefix_t * prefix) } xor_sum __attribute__ ((aligned (sizeof (u32x4)))); #ifdef CLIB_HAVE_VEC128 - if (U32X4_ALIGNED (name)) - { //SSE can't handle unaligned data - xor_sum.as_u32x4 = *((u32x4 *) name) & - UNION_CAST (prefix->fp_addr.ip6.as_u64[0], u32x4); - } - else -#endif /* 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 */ 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]); } @@ -120,7 +115,7 @@ hicn_face_prod_next_from_data_hdr (vlib_node_runtime_t * node, } else if (PREDICT_TRUE (v == 0x60 && !ip46_address_is_ip4 (&prefix->fp_addr))) { - match_res = match_ip6_name ((u32x4 *) & (ptr[8]), prefix); + match_res = match_ip6_name (& (ptr[8]), prefix); } return match_res ? HICN_FACE_PROD_NEXT_DATA_IP4 + (v == |