configure/misc: make ISA-L a hard dependency
Following discussion in a recent SPDK community meeting, it was determined that we no longer need to carry ISA-L as a user configuration option. It will be enabled by default. If running on an architecture that ISA-L isn't fully supported on, the configure script will disable associated features and display a warning and will also not build ISA-L. Same case if there are issues with dependencies. Note that --without-isal is no longer supported as a configure option. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Ibd1e5e9454d1b090462c3e757b2f51c52e6cb774 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14393 Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
b4f9bb444a
commit
dd2c08d2d1
83
configure
vendored
83
configure
vendored
@ -91,8 +91,6 @@ function usage() {
|
||||
echo " If argument is file, interpret it as compiled OCF lib"
|
||||
echo " If no argument is specified, OCF git submodule is used by default"
|
||||
echo " example: /usr/src/ocf/"
|
||||
echo " --with-isal Build with ISA-L. Enabled by default on x86 and aarch64 architectures."
|
||||
echo " --without-isal No path required."
|
||||
echo " --with-uring[=DIR] Build I/O uring bdev or socket module."
|
||||
echo " --without-uring If an argument is provided, it is considered a directory containing"
|
||||
echo " liburing.a and io_uring.h. Otherwise the regular system paths will"
|
||||
@ -166,15 +164,6 @@ if [[ $arch == *mingw* ]] || [[ $arch == *windows* ]]; then
|
||||
sys_name=Windows
|
||||
fi
|
||||
|
||||
# Sanitize default configuration. All parameters set by user explicit should fail
|
||||
# Force no ISA-L if non-x86 or non-aarch64 architecture
|
||||
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
|
||||
if [[ $arch != x86_64* ]] && [[ $arch != aarch64* ]]; then
|
||||
CONFIG[ISAL]=n
|
||||
echo "Notice: ISA-L not supported for ${arch}. Turning off default feature."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $sys_name != "Linux" ]]; then
|
||||
# Vhost, rte_vhost library and virtio are only supported on Linux.
|
||||
CONFIG[VHOST]="n"
|
||||
@ -182,22 +171,6 @@ if [[ $sys_name != "Linux" ]]; then
|
||||
echo "Notice: Vhost, rte_vhost library and virtio are only supported on Linux. Turning off default feature."
|
||||
fi
|
||||
|
||||
#check nasm only on x86
|
||||
if [[ $arch == x86_64* ]]; then
|
||||
ver=$(nasm -v 2> /dev/null | awk '{print $3}' | awk -Fr '{print $1}')
|
||||
if lt "$ver" 2.14; then
|
||||
# ISA-L, compression & crypto require NASM version 2.14 or newer.
|
||||
CONFIG[ISAL]=n
|
||||
CONFIG[CRYPTO]=n
|
||||
CONFIG[IPSEC_MB]=n
|
||||
CONFIG[REDUCE]=n
|
||||
HAVE_NASM=n
|
||||
echo "Notice: ISA-L, compression & crypto require NASM version 2.14 or newer. Turning off default ISA-L and crypto features."
|
||||
else
|
||||
HAVE_NASM=y
|
||||
fi
|
||||
fi
|
||||
|
||||
function check_dir() {
|
||||
arg="$1"
|
||||
dir="${arg#*=}"
|
||||
@ -597,12 +570,6 @@ for i in "$@"; do
|
||||
CONFIG[OCF]=n
|
||||
CONFIG[OCF_PATH]=
|
||||
;;
|
||||
--with-isal)
|
||||
CONFIG[ISAL]=y
|
||||
;;
|
||||
--without-isal)
|
||||
CONFIG[ISAL]=n
|
||||
;;
|
||||
--with-uring=*)
|
||||
CONFIG[URING]=y
|
||||
CONFIG[URING_PATH]=$(readlink -f ${i#*=})
|
||||
@ -724,19 +691,6 @@ if [[ "${CONFIG[IDXD]}" = "y" ]]; then
|
||||
|
||||
fi
|
||||
|
||||
# Detect architecture and force no ISA-L if non-x86 or non-aarch64 architecture
|
||||
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
|
||||
if [[ $arch != x86_64* ]] && [[ $arch != aarch64* ]]; then
|
||||
echo "ERROR: ISA-L cannot be used due to CPU incompatibility."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[ISAL]}" = "n" ]] && [[ "${CONFIG[REDUCE]}" = "y" ]]; then
|
||||
echo "ERROR Conflicting options: --with-reduce is not compatible with --without-isal."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${CONFIG[ENV]}" ]; then
|
||||
CONFIG[ENV]=$rootdir/lib/env_dpdk
|
||||
echo "Using default SPDK env in ${CONFIG[ENV]}"
|
||||
@ -904,14 +858,6 @@ if [[ "${CONFIG[FC]}" = "y" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
|
||||
if [[ "${HAVE_NASM}" = "n" ]] && [[ $arch == x86_64* ]]; then
|
||||
echo "ERROR: ISA-L, compression & crypto require NASM version 2.14 or newer."
|
||||
echo "Please install or upgrade them re-run this script."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[PMDK]}" = "y" ]]; then
|
||||
if ! echo -e '#include <libpmemblk.h>\nint main(void) { return 0; }\n' \
|
||||
| "${BUILD_CMD[@]}" -lpmemblk - 2> /dev/null; then
|
||||
@ -1169,13 +1115,33 @@ if [[ "${CONFIG[FUZZER]}" = "y" && "$CC_TYPE" != "clang" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
|
||||
if [[ $arch == x86_64* ]] || [[ $arch == aarch64* ]]; then
|
||||
CONFIG[ISAL]=y
|
||||
# make sure the submodule is initialized
|
||||
if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then
|
||||
echo "ISA-L was not found; To install ISA-L run:"
|
||||
echo "ISA-L is required but was not found, please init the submodule with:"
|
||||
echo " git submodule update --init"
|
||||
echo "and then re-run this script."
|
||||
exit 1
|
||||
fi
|
||||
# for x86 only, check the nasm version for ISA-L and IPSEC
|
||||
if [[ $arch == x86_64* ]]; then
|
||||
ver=$(nasm -v 2> /dev/null | awk '{print $3}' | awk -Fr '{print $1}')
|
||||
if lt "$ver" 2.14; then
|
||||
CONFIG[ISAL]=n
|
||||
# IPSEC has nasm requirement and DPDK crypto relies on IPSEC
|
||||
CONFIG[IPSEC_MB]=n
|
||||
echo "WARNING: ISA-L & DPDK crypto cannot be used as nasm ver must be 2.14 or newer."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# for PPC
|
||||
CONFIG[ISAL]=n
|
||||
echo "WARNING: ISA-L cannot be used due to architecture incompatibility."
|
||||
fi
|
||||
|
||||
# now either configure ISA-L or disable unavailable features
|
||||
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
|
||||
cd $rootdir/isa-l
|
||||
ISAL_LOG=$rootdir/isa-l/spdk-isal.log
|
||||
if [[ -n "${CONFIG[CROSS_PREFIX]}" ]]; then
|
||||
@ -1188,6 +1154,11 @@ if [[ "${CONFIG[ISAL]}" = "y" ]]; then
|
||||
./configure CFLAGS="-fPIC -g -O2" "${ISAL_OPTS[@]}" --enable-shared=no >> $ISAL_LOG 2>&1
|
||||
echo "done."
|
||||
cd $rootdir
|
||||
else
|
||||
echo "Without ISA-L, there is no software support for crypto or compression,"
|
||||
echo "so these features will be disabled."
|
||||
CONFIG[CRYPTO]=n
|
||||
CONFIG[REDUCE]=n
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[SMA]}" = "y" ]]; then
|
||||
|
@ -13,6 +13,10 @@ SO_SUFFIX := $(SO_VER).$(SO_MINOR)
|
||||
LIBNAME = accel
|
||||
C_SRCS = accel.c accel_rpc.c accel_sw.c
|
||||
|
||||
ifeq ($(CONFIG_ISAL), y)
|
||||
LOCAL_SYS_LIBS = -L$(ISAL_DIR)/.libs -lisal
|
||||
endif
|
||||
|
||||
SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_accel.map)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk
|
||||
|
@ -15,6 +15,10 @@ C_SRCS = base64.c bit_array.c cpuset.c crc16.c crc32.c crc32c.c crc32_ieee.c \
|
||||
LIBNAME = util
|
||||
LOCAL_SYS_LIBS = -luuid
|
||||
|
||||
ifeq ($(CONFIG_ISAL), y)
|
||||
LOCAL_SYS_LIBS += -L$(ISAL_DIR)/.libs -lisal
|
||||
endif
|
||||
|
||||
SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_util.map)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk
|
||||
|
@ -467,10 +467,6 @@ function get_config_params() {
|
||||
config_params+=' --enable-coverage'
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_ISAL -eq 0 ]; then
|
||||
config_params+=' --without-isal'
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_BLOBFS -eq 1 ]; then
|
||||
if [[ -d /usr/include/fuse3 ]] || [[ -d /usr/local/include/fuse3 ]]; then
|
||||
config_params+=' --with-fuse'
|
||||
|
@ -136,7 +136,6 @@ function install_refspdk() {
|
||||
# Prepare separate, fixed, cmdline for the FreeBSD, Issue #1397.
|
||||
if [[ $OSID == freebsd ]]; then
|
||||
config_params="--enable-debug"
|
||||
config_params+=" --without-isal"
|
||||
config_params+=" --with-idxd --disable-unit-tests"
|
||||
|
||||
MAKE=gmake
|
||||
|
@ -18,7 +18,7 @@ if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then
|
||||
WITH_DPDK="--with-dpdk=$SPDK_RUN_EXTERNAL_DPDK"
|
||||
fi
|
||||
make -C $SPDK_DIR clean
|
||||
$SPDK_DIR/configure --with-shared --without-isal --without-ocf --disable-asan $WITH_DPDK
|
||||
$SPDK_DIR/configure --with-shared --without-ocf --disable-asan $WITH_DPDK
|
||||
make -C $SPDK_DIR -j$(nproc)
|
||||
|
||||
export SPDK_HEADER_DIR="$SPDK_DIR/include"
|
||||
@ -58,7 +58,7 @@ run_test "external_run_nvme_shared" $_sudo $test_root/nvme/identify.sh
|
||||
make -C $test_root clean
|
||||
|
||||
make -C $SPDK_DIR clean
|
||||
$SPDK_DIR/configure --without-shared --without-isal --without-ocf --disable-asan $WITH_DPDK
|
||||
$SPDK_DIR/configure --without-shared --without-ocf --disable-asan $WITH_DPDK
|
||||
make -C $SPDK_DIR -j$(nproc)
|
||||
|
||||
# Make both the application and bdev against individual SPDK archives.
|
||||
|
@ -11,7 +11,7 @@ TEST_TIMEOUT=1200
|
||||
allowed_nvme_transports=("rdma" "tcp")
|
||||
allowed_vhost_transports=("scsi" "blk" "all")
|
||||
bad_transport=true
|
||||
config_params="--enable-asan --enable-ubsan --enable-debug --without-isal"
|
||||
config_params="--enable-asan --enable-ubsan --enable-debug"
|
||||
|
||||
# These arguments are used in addition to the test arguments in autotest_common.sh
|
||||
for i in "$@"; do
|
||||
|
Loading…
Reference in New Issue
Block a user