diff options
author | Damjan Marion <damarion@cisco.com> | 2016-10-28 22:35:17 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-10-31 16:40:30 +0000 |
commit | c967a8239d98830e0b889bf9a621581a38a71dd8 (patch) | |
tree | daa391caa510080134cfd137126776c15e948cdf /vnet | |
parent | ff7d642f3db5302e1fe70b6f1b9afdb4c63fa1d8 (diff) |
vppinfra: use 64-bit crc32 instruction in bihash_24_8
Change-Id: Ibeb6d35e15a8d332753df7c352c0b51c277a0ee5
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/map/map.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c index beeaf112..aeec6a94 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 |