Use neutral vector code for ethernet_frame_is_tagged
Also it removes ethernet_frame_is_any_taged implemebntation
which seems to be equally costly compared to two
invocations of ethernet_frame_is_tagged.
Change-Id: If1c95f8267cd34b807ec07e0d675cbd0db2fdf9f
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vppinfra/vector_sse2.h b/src/vppinfra/vector_sse2.h
index 6830d5c..ce1bb81 100644
--- a/src/vppinfra/vector_sse2.h
+++ b/src/vppinfra/vector_sse2.h
@@ -545,6 +545,31 @@
return u32x4_is_equal (x, zero);
}
+
+always_inline int
+u8x16_is_all_zero (u8x16 x)
+{
+ return _mm_testz_si128 ((__m128i) x, (__m128i) x);
+}
+
+always_inline int
+u16x8_is_all_zero (u16x8 x)
+{
+ return _mm_testz_si128 ((__m128i) x, (__m128i) x);
+}
+
+always_inline int
+u32x4_is_all_zero (u32x4 x)
+{
+ return _mm_testz_si128 ((__m128i) x, (__m128i) x);
+}
+
+always_inline int
+u64x2_is_all_zero (u64x2 x)
+{
+ return _mm_testz_si128 ((__m128i) x, (__m128i) x);
+}
+
#define u32x4_select(A,MASK) \
({ \
u32x4 _x, _y; \