From 843a22e7df7d2d9f6810a29cd469d531a80a0136 Mon Sep 17 00:00:00 2001 From: Brian Szmyd Date: Wed, 20 Dec 2023 19:54:37 +0000 Subject: [PATCH] Move macro test to common area. --- src/include/homestore/btree/detail/btree_node.hpp | 5 ----- src/lib/common/crc.h | 7 +++++++ src/lib/device/device.h | 4 ---- src/lib/device/device_manager.cpp | 4 ---- src/lib/device/physical_dev.hpp | 4 ---- src/lib/logstore/log_group.cpp | 5 ----- 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/include/homestore/btree/detail/btree_node.hpp b/src/include/homestore/btree/detail/btree_node.hpp index 895e377a7..b4f7dab65 100644 --- a/src/include/homestore/btree/detail/btree_node.hpp +++ b/src/include/homestore/btree/detail/btree_node.hpp @@ -24,12 +24,7 @@ #include #include "btree_internal.hpp" #include -// #include -#ifndef NO_ISAL -#include -#else #include "common/crc.h" -#endif namespace homestore { ENUM(locktype_t, uint8_t, NONE, READ, WRITE) diff --git a/src/lib/common/crc.h b/src/lib/common/crc.h index 656a60ada..ea893d52e 100644 --- a/src/lib/common/crc.h +++ b/src/lib/common/crc.h @@ -1,5 +1,11 @@ #pragma once +// Only x86 and x86_64 supported by Intel Storage Acceleration library +#ifndef NO_ISAL +#include + +#else + #define MAX_ITER 8 extern "C" { @@ -37,3 +43,4 @@ static inline uint32_t crc32_ieee(uint32_t seed, const unsigned char* buf, uint6 return ~rem; } } +#endif diff --git a/src/lib/device/device.h b/src/lib/device/device.h index 31efd8e43..42dce472d 100644 --- a/src/lib/device/device.h +++ b/src/lib/device/device.h @@ -17,11 +17,7 @@ #include #include -#ifndef NO_ISAL -#include -#else #include "common/crc.h" -#endif #include #include #include diff --git a/src/lib/device/device_manager.cpp b/src/lib/device/device_manager.cpp index 53bd926cd..9376b8005 100644 --- a/src/lib/device/device_manager.cpp +++ b/src/lib/device/device_manager.cpp @@ -15,11 +15,7 @@ #include #include -#ifndef NO_ISAL -#include -#else #include "common/crc.h" -#endif #include #include diff --git a/src/lib/device/physical_dev.hpp b/src/lib/device/physical_dev.hpp index 60b36b5c1..20e41a02e 100644 --- a/src/lib/device/physical_dev.hpp +++ b/src/lib/device/physical_dev.hpp @@ -25,11 +25,7 @@ #include #include -#ifndef NO_ISAL -#include -#else #include "common/crc.h" -#endif #include #include #include diff --git a/src/lib/logstore/log_group.cpp b/src/lib/logstore/log_group.cpp index 13392c708..a94ff7fa1 100644 --- a/src/lib/logstore/log_group.cpp +++ b/src/lib/logstore/log_group.cpp @@ -15,11 +15,6 @@ *********************************************************************************/ #include -#ifndef NO_ISAL -#include -#else -#endif - #include #include "common/homestore_assert.hpp" #include "log_dev.hpp"