aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damjan.marion@gmail.com>2019-01-24 15:36:57 +0100
committerDamjan Marion <damjan.marion@gmail.com>2019-01-24 15:36:57 +0100
commit22f23ae802f6dc654dbef27340c67773eb8be8c3 (patch)
tree514a791dcf54c3a0f0de59d79cc2cf81c9fd4955 /src/vlib
parent478839b9eccabc9abf6717b9b8a8fb545f294bca (diff)
buffers: fix vector types
Change-Id: I9df96264e30806ac3daf7121f314f34f06232413 Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/buffer.h4
-rw-r--r--src/vlib/buffer_funcs.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index 095c09d10f6..f7fdf208a83 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -178,10 +178,10 @@ typedef union
u8x16 as_u8x16[4];
#endif
#ifdef CLIB_HAVE_VEC256
- u8x16 as_u8x32[2];
+ u8x32 as_u8x32[2];
#endif
#ifdef CLIB_HAVE_VEC512
- u8x16 as_u8x64[1];
+ u8x64 as_u8x64[1];
#endif
} vlib_buffer_t;
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index c2241476094..1c1cd28e95f 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -74,7 +74,9 @@ STATIC_ASSERT_OFFSET_OF (vlib_buffer_t, template_end, 64);
static_always_inline void
vlib_buffer_copy_template (vlib_buffer_t * b, vlib_buffer_t * bt)
{
-#if defined CLIB_HAVE_VEC256
+#if defined CLIB_HAVE_VEC512
+ b->as_u8x64[0] = bt->as_u8x64[0];
+#elif defined (CLIB_HAVE_VEC256)
b->as_u8x32[0] = bt->as_u8x32[0];
b->as_u8x32[1] = bt->as_u8x32[1];
#elif defined (CLIB_HAVE_VEC128)