summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/map/map.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c
index beeaf1121a6..aeec6a946c9 100644
--- a/vnet/vnet/map/map.c
+++ b/vnet/vnet/map/map.c
@@ -22,7 +22,15 @@
#include "map.h"
-#ifndef __SSE4_2__
+#ifdef __SSE4_2__
+static inline u32
+crc_u32 (u32 data, u32 value)
+{
+ __asm__ volatile ("crc32l %[data], %[value];":[value] "+r" (value):[data]
+ "rm" (data));
+ return value;
+}
+#else
#include <vppinfra/xxhash.h>
static inline u32