hash: use armv8-a CRC32 instructions
[dpdk.git] / lib / librte_hash / rte_hash_crc.h
index 1f6f5bf..78a34b7 100644 (file)
@@ -407,9 +407,14 @@ crc32c_sse42_u64(uint64_t data, uint64_t init_val)
 #define CRC32_SSE42         (1U << 1)
 #define CRC32_x64           (1U << 2)
 #define CRC32_SSE42_x64     (CRC32_x64|CRC32_SSE42)
+#define CRC32_ARM64         (1U << 3)
 
 static uint8_t crc32_alg = CRC32_SW;
 
+#if defined(RTE_ARCH_ARM64)
+#include "rte_crc_arm64.h"
+#else
+
 /**
  * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
  * calculation.
@@ -498,6 +503,8 @@ rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
        return crc32c_2words(data, init_val);
 }
 
+#endif
+
 /**
  * Calculate CRC32 hash on user-supplied byte array.
  *