From f195a5693450083c7c6840c5aab02bfe5088cb40 Mon Sep 17 00:00:00 2001 From: Christophe Fontaine Date: Wed, 5 Apr 2017 11:49:07 +0200 Subject: [plugins/dpdk] Support for CLIB_HAVE_64 (aarch64) For platforms which do not support u8x32, such as aarch64, add an alternative implementation of 'dpdk_buffer_init_from_template'. Change-Id: Ia7e8d0a5985fa5925e063ed6e890208c73e39933 Signed-off-by: Christophe Fontaine --- src/plugins/dpdk/device/node.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plugins/dpdk/device') diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c index 0562b48a..69acc529 100644 --- a/src/plugins/dpdk/device/node.c +++ b/src/plugins/dpdk/device/node.c @@ -267,6 +267,7 @@ static_always_inline void dpdk_buffer_init_from_template (void *d0, void *d1, void *d2, void *d3, void *s) { +#if defined(CLIB_HAVE_VEC128) int i; for (i = 0; i < 2; i++) { @@ -275,6 +276,18 @@ dpdk_buffer_init_from_template (void *d0, void *d1, void *d2, void *d3, *(u8x32 *) (((u8 *) d2) + i * 32) = *(u8x32 *) (((u8 *) d3) + i * 32) = *(u8x32 *) (((u8 *) s) + i * 32); } +#elif defined(CLIB_HAVE_VEC64) + int i; + for (i = 0; i < 4; i++) + { + *(u8x16 *) (((u8 *) d0) + i * 16) = + *(u8x16 *) (((u8 *) d1) + i * 16) = + *(u8x16 *) (((u8 *) d2) + i * 16) = + *(u8x16 *) (((u8 *) d3) + i * 16) = *(u8x16 *) (((u8 *) s) + i * 16); + } +#else +#error "Either CLIB_HAVE_VEC128 or CLIB_HAVE_VEC64 has to be defined" +#endif } /* -- cgit 1.2.3-korg