summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-03-12 11:56:00 +0100
committerDamjan Marion <dmarion@me.com>2020-03-16 19:09:39 +0000
commitdd648aac0615c416507de9097b6f50db16ad319c (patch)
tree37a19fb2db728567f49aa1928f947b64edf55142 /src/vppinfra
parentd35887297d6320efb36c24ef123480f27a736b16 (diff)
rdma: add Mellanox mlx5 Direct Verbs receive support
Type: feature Change-Id: I3f287ab536a482c366ad7df47e1c04e640992ebc Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/vector_avx2.h10
-rw-r--r--src/vppinfra/vector_neon.h6
2 files changed, 16 insertions, 0 deletions
diff --git a/src/vppinfra/vector_avx2.h b/src/vppinfra/vector_avx2.h
index 482bdd515c9..8cc1d77d63c 100644
--- a/src/vppinfra/vector_avx2.h
+++ b/src/vppinfra/vector_avx2.h
@@ -132,6 +132,16 @@ _(i8x16, i64x4, epi8_epi64)
#undef _
/* *INDENT-ON* */
+static_always_inline u64x4
+u64x4_byte_swap (u64x4 v)
+{
+ u8x32 swap = {
+ 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8,
+ 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8,
+ };
+ return (u64x4) _mm256_shuffle_epi8 ((__m256i) v, (__m256i) swap);
+}
+
static_always_inline u32x8
u32x8_byte_swap (u32x8 v)
{
diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h
index 14930d664d5..d80c691e3d9 100644
--- a/src/vppinfra/vector_neon.h
+++ b/src/vppinfra/vector_neon.h
@@ -103,6 +103,12 @@ u16x8_byte_swap (u16x8 v)
return (u16x8) vrev16q_u8 ((u8x16) v);
}
+static_always_inline u32x4
+u32x4_byte_swap (u32x4 v)
+{
+ return vrev64q_u32 (v);
+}
+
static_always_inline u8x16
u8x16_shuffle (u8x16 v, u8x16 m)
{