Disable vector code in vlib_buffer_enqueue_to_next if no msb mask function 59/12659/3
authorDamjan Marion <damarion@cisco.com>
Sat, 19 May 2018 08:27:10 +0000 (10:27 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Sat, 19 May 2018 11:22:44 +0000 (11:22 +0000)
This fixes ARM64 build where we dont have defined u16x8_msb_mask(...)

Change-Id: I864f5134a0d951601810c800f587d173b3b7ef41
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vlib/buffer_node.h
src/vppinfra/vector_sse42.h

index 1c4f4e7..c9f4895 100644 (file)
@@ -359,7 +359,7 @@ vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node,
       next16 = (next16 == u16x16_splat (next16[0]));
       u64 bitmap = u8x32_msb_mask ((u8x32) next16);
       n_enqueued = count_trailing_zeros (~bitmap) / 2;
-#elif defined(CLIB_HAVE_VEC128)
+#elif defined(CLIB_HAVE_VEC128) && defined(CLIB_HAVE_VEC128_MSB_MASK)
       u16x8 next8 = u16x8_load_unaligned (nexts);
       next8 = (next8 == u16x8_splat (next8[0]));
       u64 bitmap = u8x16_msb_mask ((u8x16) next8);
index 50aa662..0e334c8 100644 (file)
@@ -580,6 +580,8 @@ u8x16_msb_mask (u8x16 v)
   return _mm_movemask_epi8 ((__m128i) v);
 }
 
+#define CLIB_HAVE_VEC128_MSB_MASK
+
 #undef _signed_binop
 
 #endif /* included_vector_sse2_h */