util add crc_internal.h

The preprocessor code will be needed in another
crc-related .c file in an upcoming patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icc5e6f0d81f76093dfc973a9c1fe56271baf1ed8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16687
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Jim Harris 2023-02-03 07:38:15 +00:00 committed by Tomasz Zawadzki
parent 677907db73
commit 500ce16976
2 changed files with 23 additions and 11 deletions

View File

@ -4,19 +4,9 @@
*/
#include "util_internal.h"
#include "crc_internal.h"
#include "spdk/crc32.h"
#ifdef SPDK_CONFIG_ISAL
#define SPDK_HAVE_ISAL
#include <isa-l/include/crc.h>
#elif defined(__aarch64__) && defined(__ARM_FEATURE_CRC32)
#define SPDK_HAVE_ARM_CRC
#include <arm_acle.h>
#elif defined(__x86_64__) && defined(__SSE4_2__)
#define SPDK_HAVE_SSE4_2
#include <x86intrin.h>
#endif
#ifdef SPDK_HAVE_ISAL
uint32_t

22
lib/util/crc_internal.h Normal file
View File

@ -0,0 +1,22 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (C) 2023 Intel Corporation.
* All rights reserved.
*/
#ifndef SPDK_CRC_INTERNAL_H
#define SPDK_CRC_INTERNAL_H
#include "spdk/config.h"
#ifdef SPDK_CONFIG_ISAL
#define SPDK_HAVE_ISAL
#include <isa-l/include/crc.h>
#elif defined(__aarch64__) && defined(__ARM_FEATURE_CRC32)
#define SPDK_HAVE_ARM_CRC
#include <arm_acle.h>
#elif defined(__x86_64__) && defined(__SSE4_2__)
#define SPDK_HAVE_SSE4_2
#include <x86intrin.h>
#endif
#endif /* SPDK_CRC_INTERNAL_H */