Commit 3d969f40 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

lib/util/crc64: use crc64 from isa-l v2.31



After update to isa-l v2.31 it is no longer needed
to use implementation from SPDK.
Prior implementation remains to handle SPDK_CONFIG_ISA
the same way it is done in crc16.c.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iaefe4a4acf616104a78a0db7ab2d178941ad8dcd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21502


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 45a053c5
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -6,6 +6,17 @@
#include "crc_internal.h"
#include "spdk/crc64.h"

#ifdef SPDK_CONFIG_ISAL
#include "isa-l/include/crc64.h"

uint64_t
spdk_crc64_nvme(const void *buf, size_t len, uint64_t crc)
{
	return crc64_rocksoft_refl(crc, (const uint8_t *)buf, len);
}

#else

static const uint64_t crc64_rocksoft_refl_table[256] = {
	0x0000000000000000ULL, 0x7f6ef0c830358979ULL,
	0xfedde190606b12f2ULL, 0x81b31158505e9b8bULL,
@@ -155,3 +166,4 @@ spdk_crc64_nvme(const void *buf, size_t len, uint64_t crc)
{
	return crc64_rocksoft_refl_base(crc, (const uint8_t *)buf, len);
}
#endif