2017-03-30 19:06:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
function usage()
|
|
|
|
{
|
|
|
|
echo "'configure' configures SPDK to compile on supported platforms."
|
|
|
|
echo ""
|
|
|
|
echo "Usage: ./configure [OPTION]..."
|
|
|
|
echo ""
|
|
|
|
echo "Defaults for the options are specified in brackets."
|
|
|
|
echo ""
|
|
|
|
echo "General:"
|
|
|
|
echo " -h, --help Display this help and exit"
|
2017-11-15 17:36:36 +00:00
|
|
|
echo ""
|
|
|
|
echo " --prefix=path Configure installation prefix (default: /usr/local)"
|
|
|
|
echo ""
|
2017-03-30 19:06:49 +00:00
|
|
|
echo " --enable-debug Configure for debug builds"
|
2018-09-10 14:08:25 +00:00
|
|
|
echo " --enable-log-bt Enable support of backtrace printing in SPDK logs (requires libunwind)."
|
2017-03-30 19:06:49 +00:00
|
|
|
echo " --enable-werror Treat compiler warnings as errors"
|
|
|
|
echo " --enable-asan Enable address sanitizer"
|
|
|
|
echo " --enable-ubsan Enable undefined behavior sanitizer"
|
|
|
|
echo " --enable-coverage Enable code coverage tracking"
|
2016-03-24 20:27:53 +00:00
|
|
|
echo " --enable-lto Enable link-time optimization"
|
2018-03-06 22:39:04 +00:00
|
|
|
echo " --disable-tests Disable building of tests"
|
2017-03-30 19:06:49 +00:00
|
|
|
echo " --with-env=path Use an alternate environment implementation"
|
|
|
|
echo ""
|
|
|
|
echo "Specifying Dependencies:"
|
|
|
|
echo "--with-DEPENDENCY[=path] Use the given dependency. Optionally, provide the"
|
|
|
|
echo " path."
|
|
|
|
echo "--without-DEPENDENCY Do not link to the given dependency. This may"
|
|
|
|
echo " disable features and components."
|
|
|
|
echo ""
|
|
|
|
echo "Valid dependencies are listed below."
|
2018-03-22 23:24:14 +00:00
|
|
|
echo " crypto Required to build vbdev crypto module."
|
|
|
|
echo " No path required."
|
2017-05-08 22:07:13 +00:00
|
|
|
echo " dpdk Optional. Uses dpdk submodule in spdk tree if not specified."
|
2017-03-30 19:06:49 +00:00
|
|
|
echo " example: /usr/share/dpdk/x86_64-default-linuxapp-gcc"
|
|
|
|
echo " fio Required to build fio_plugin."
|
|
|
|
echo " example: /usr/src/fio"
|
2018-03-14 00:05:36 +00:00
|
|
|
echo " vhost Required to build vhost target."
|
|
|
|
echo " No path required."
|
2017-10-17 17:04:28 +00:00
|
|
|
echo " virtio Required to build vhost initiator (Virtio) bdev module."
|
|
|
|
echo " No path required."
|
2018-04-03 23:07:39 +00:00
|
|
|
echo " pmdk Required to build persistent memory bdev."
|
|
|
|
echo " example: /usr/share/pmdk"
|
2018-03-13 14:42:45 +00:00
|
|
|
echo " vpp Required to build VPP net module."
|
|
|
|
echo " example: /vpp_repo/build-root/install-vpp-native/vpp"
|
2017-03-30 19:06:49 +00:00
|
|
|
echo " rbd [disabled]"
|
|
|
|
echo " No path required."
|
|
|
|
echo " rdma [disabled]"
|
|
|
|
echo " No path required."
|
2018-08-14 17:56:26 +00:00
|
|
|
echo " shared Required to build spdk shared libraries."
|
|
|
|
echo " No path required."
|
2017-12-04 17:07:04 +00:00
|
|
|
echo " iscsi-initiator [disabled]"
|
|
|
|
echo " No path required."
|
2017-05-30 08:45:46 +00:00
|
|
|
echo " vtune Required to profile I/O under Intel VTune Amplifier XE."
|
|
|
|
echo " example: /opt/intel/vtune_amplifier_xe_version"
|
2017-03-30 19:06:49 +00:00
|
|
|
echo ""
|
2018-03-28 18:24:48 +00:00
|
|
|
echo "Environment variables:"
|
|
|
|
echo ""
|
|
|
|
echo "CFLAGS C compiler flags"
|
|
|
|
echo "CXXFLAGS C++ compiler flags"
|
|
|
|
echo "LDFLAGS Linker flags"
|
|
|
|
echo "DESTDIR Destination for 'make install'"
|
|
|
|
echo ""
|
2017-03-30 19:06:49 +00:00
|
|
|
}
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
# Load default values
|
|
|
|
# Convert config to sourcable configuration file
|
|
|
|
sed -r 's/CONFIG_([[:alnum:]_]+)\?=(.*)/CONFIG[\1]=\2/g' CONFIG > CONFIG.sh
|
|
|
|
declare -A CONFIG
|
|
|
|
source CONFIG.sh
|
|
|
|
rm CONFIG.sh
|
|
|
|
|
|
|
|
|
2018-03-08 23:02:09 +00:00
|
|
|
function check_dir() {
|
|
|
|
arg="$1"
|
|
|
|
dir="${arg#*=}"
|
|
|
|
if [ ! -d "$dir" ]; then
|
|
|
|
echo "$arg: directory not found"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-03-30 19:06:49 +00:00
|
|
|
for i in "$@"; do
|
|
|
|
case "$i" in
|
|
|
|
-h|--help)
|
|
|
|
usage
|
|
|
|
exit 0
|
|
|
|
;;
|
2017-11-15 17:36:36 +00:00
|
|
|
--prefix=*)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[PREFIX]="${i#*=}"
|
2017-11-15 17:36:36 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--enable-debug)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[DEBUG]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--disable-debug)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[DEBUG]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2018-09-10 14:08:25 +00:00
|
|
|
--enable-log-bt)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[LOG_BACKTRACE]=y
|
2018-09-10 14:08:25 +00:00
|
|
|
;;
|
|
|
|
--disable-log-bt)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[LOG_BACKTRACE]=n
|
2018-07-18 19:08:17 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--enable-asan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[ASAN]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--disable-asan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[ASAN]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--enable-ubsan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[UBSAN]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--disable-ubsan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[UBSAN]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2017-05-24 22:00:54 +00:00
|
|
|
--enable-tsan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[TSAN]=y
|
2017-05-24 22:00:54 +00:00
|
|
|
;;
|
|
|
|
--disable-tsan)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[TSAN]=n
|
2017-05-24 22:00:54 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--enable-coverage)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[COVERAGE]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--disable-coverage)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[COVERAGE]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2016-03-24 20:27:53 +00:00
|
|
|
--enable-lto)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[LTO]=y
|
2016-03-24 20:27:53 +00:00
|
|
|
;;
|
|
|
|
--disable-lto)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[LTO]=n
|
2016-03-24 20:27:53 +00:00
|
|
|
;;
|
2018-03-06 22:39:04 +00:00
|
|
|
--enable-tests)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[TESTS]=y
|
2018-03-06 22:39:04 +00:00
|
|
|
;;
|
|
|
|
--disable-tests)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[TESTS]=n
|
2018-03-06 22:39:04 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--enable-werror)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[WERROR]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--disable-werror)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[WERROR]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--with-env=*)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[ENV]="${i#*=}"
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--with-rbd)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RBD]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--without-rbd)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RBD]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2018-05-08 11:30:29 +00:00
|
|
|
--with-raid)
|
2018-09-18 22:55:06 +00:00
|
|
|
echo "--with-raid option ignored and is now deprecated. RAID module is always enabled."
|
2018-05-08 11:30:29 +00:00
|
|
|
;;
|
|
|
|
--without-raid)
|
2018-09-18 22:55:06 +00:00
|
|
|
echo "--without-raid option ignored and is now deprecated. RAID module is always enabled."
|
2018-05-08 11:30:29 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--with-rdma)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RDMA]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--without-rdma)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RDMA]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2018-08-14 17:56:26 +00:00
|
|
|
--with-shared)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[SHARED]=y
|
2018-08-14 17:56:26 +00:00
|
|
|
;;
|
|
|
|
--without-shared)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[SHARED]=n
|
2018-08-14 17:56:26 +00:00
|
|
|
;;
|
2017-12-04 17:07:04 +00:00
|
|
|
--with-iscsi-initiator)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[ISCSI_INITIATOR]=y
|
2017-12-04 17:07:04 +00:00
|
|
|
;;
|
|
|
|
--without-iscsi-initiator)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[ISCSI_INITIATOR]=n
|
2017-12-04 17:07:04 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--with-dpdk=*)
|
2018-03-08 23:02:09 +00:00
|
|
|
check_dir "$i"
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[DPDK_DIR]=$(readlink -f ${i#*=})
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--without-dpdk)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[DPDK_DIR]=
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2018-03-22 23:24:14 +00:00
|
|
|
--with-crypto)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[CRYPTO]=y
|
2018-03-22 23:24:14 +00:00
|
|
|
;;
|
|
|
|
--without-crypto)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[CRYPTO]=n
|
2018-03-22 23:24:14 +00:00
|
|
|
;;
|
2018-03-14 00:05:36 +00:00
|
|
|
--with-vhost)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VHOST]=y
|
2018-03-14 00:05:36 +00:00
|
|
|
;;
|
|
|
|
--without-vhost)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VHOST]=n
|
2018-03-14 00:05:36 +00:00
|
|
|
;;
|
2017-10-17 17:04:28 +00:00
|
|
|
--with-virtio)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VIRTIO]=y
|
2017-10-17 17:04:28 +00:00
|
|
|
;;
|
|
|
|
--without-virtio)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VIRTIO]=n
|
2017-10-17 17:04:28 +00:00
|
|
|
;;
|
2018-04-03 23:07:39 +00:00
|
|
|
--with-pmdk)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[PMDK]=y
|
|
|
|
CONFIG[PMDK_DIR]=""
|
2017-09-29 08:49:51 +00:00
|
|
|
;;
|
2018-04-03 23:07:39 +00:00
|
|
|
--with-pmdk=*)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[PMDK]=y
|
2018-03-08 23:02:09 +00:00
|
|
|
check_dir "$i"
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[PMDK_DIR]=$(readlink -f ${i#*=})
|
2017-09-29 08:49:51 +00:00
|
|
|
;;
|
2018-04-03 23:07:39 +00:00
|
|
|
--without-pmdk)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[PMDK]=n
|
2017-09-29 08:49:51 +00:00
|
|
|
;;
|
2018-03-13 14:42:45 +00:00
|
|
|
--with-vpp)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VPP]=y
|
2018-03-13 14:42:45 +00:00
|
|
|
;;
|
|
|
|
--with-vpp=*)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VPP]=y
|
2018-03-13 14:42:45 +00:00
|
|
|
check_dir "$i"
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VPP_DIR]=$(readlink -f ${i#*=})
|
2018-03-13 14:42:45 +00:00
|
|
|
;;
|
|
|
|
--without-vpp)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VPP]=n
|
2018-03-13 14:42:45 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--with-fio=*)
|
2018-03-08 23:02:09 +00:00
|
|
|
check_dir "$i"
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[FIO_SOURCE_DIR]="${i#*=}"
|
|
|
|
CONFIG[FIO_PLUGIN]=y
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
|
|
|
--without-fio)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[FIO_SOURCE_DIR]=
|
|
|
|
CONFIG[FIO_PLUGIN]=n
|
2017-03-30 19:06:49 +00:00
|
|
|
;;
|
2017-05-30 08:45:46 +00:00
|
|
|
--with-vtune=*)
|
2018-03-08 23:02:09 +00:00
|
|
|
check_dir "$i"
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VTUNE_DIR]="${i#*=}"
|
|
|
|
CONFIG[VTUNE]=y
|
2017-05-30 08:45:46 +00:00
|
|
|
;;
|
|
|
|
--without-vtune)
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VTUNE_DIR]=
|
|
|
|
CONFIG[VTUNE]=n
|
2017-05-30 08:45:46 +00:00
|
|
|
;;
|
2017-03-30 19:06:49 +00:00
|
|
|
--)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unrecognized option $i"
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ -z "${CONFIG[ENV]}" ]; then
|
|
|
|
rootdir=$(readlink -f $(dirname $0))
|
|
|
|
CONFIG[ENV]=$rootdir/lib/env_dpdk
|
|
|
|
echo "Using default SPDK env in ${CONFIG[ENV]}"
|
|
|
|
if [ -z "${CONFIG[DPDK_DIR]}" ]; then
|
2017-06-02 00:51:29 +00:00
|
|
|
if [ ! -f "$rootdir"/dpdk/config/common_spdk ]; then
|
|
|
|
echo "DPDK not found; please specify --with-dpdk=<path> or run:"
|
|
|
|
echo
|
|
|
|
echo " git submodule update --init"
|
|
|
|
exit 1
|
2018-10-03 14:58:36 +00:00
|
|
|
else
|
|
|
|
CONFIG[DPDK_DIR]="${rootdir}/dpdk/build"
|
|
|
|
echo "Using default DPDK in ${CONFIG[DPDK_DIR]}"
|
2017-06-02 00:51:29 +00:00
|
|
|
fi
|
2017-03-30 19:06:49 +00:00
|
|
|
fi
|
2018-07-19 19:55:44 +00:00
|
|
|
else
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ "${CONFIG[VHOST]}" = "y" ]; then
|
2018-07-19 19:55:44 +00:00
|
|
|
echo "Vhost is only supported when using the default DPDK environment. Disabling it."
|
|
|
|
fi
|
|
|
|
# Always disable vhost, but only print the error message if the user explicitly turned it on.
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VHOST]="n"
|
|
|
|
if [ "${CONFIG[VIRTIO]}" = "y" ]; then
|
2018-07-19 19:55:44 +00:00
|
|
|
echo "Virtio is only supported when using the default DPDK environment. Disabling it."
|
|
|
|
fi
|
|
|
|
# Always disable virtio, but only print the error message if the user explicitly turned it on.
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[VIRTIO]="n"
|
2017-03-30 19:06:49 +00:00
|
|
|
fi
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ "${CONFIG[FIO_PLUGIN]}" = "y" ]; then
|
|
|
|
if [ -z "${CONFIG[FIO_SOURCE_DIR]}" ]; then
|
2017-03-30 19:06:49 +00:00
|
|
|
echo "When fio is enabled, you must specify the fio directory using --with-fio=path"
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-10-03 14:58:36 +00:00
|
|
|
else
|
|
|
|
CONFIG[FIO_SOURCE_DIR]=
|
2017-03-30 19:06:49 +00:00
|
|
|
fi
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ "${CONFIG[VTUNE]}" = "y" ]; then
|
|
|
|
if [ -z "${CONFIG[VTUNE_DIR]}" ]; then
|
2017-05-30 08:45:46 +00:00
|
|
|
echo "When VTune is enabled, you must specify the VTune directory using --with-vtune=path"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ "${CONFIG[ASAN]}" = "y" -a "${CONFIG[TSAN]}" = "y" ]; then
|
2017-05-24 22:00:54 +00:00
|
|
|
echo "ERROR: ASAN and TSAN cannot be enabled at the same time."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-08-14 17:56:26 +00:00
|
|
|
if [[ "$OSTYPE" == "freebsd"* ]]; then
|
2017-07-13 18:01:45 +00:00
|
|
|
# FreeBSD doesn't support all configurations
|
2018-10-03 14:58:36 +00:00
|
|
|
if [[ "${CONFIG[COVERAGE]}" == "y" ]]; then
|
2017-07-13 18:01:45 +00:00
|
|
|
echo "ERROR: CONFIG_COVERAGE not available on FreeBSD"
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-06-14 00:01:22 +00:00
|
|
|
fi
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [ "${CONFIG[RDMA]}" = "y" ]; then
|
2018-08-15 20:09:49 +00:00
|
|
|
if [ "$OSTYPE" != "FreeBSD"* ]; then
|
|
|
|
ibv_lib_file="$(readlink -f /usr/lib64/libibverbs.so)" || true
|
|
|
|
if [ -z $ibv_lib_file ]; then
|
|
|
|
ibv_lib_file="libibverbs.so.0.0.0"
|
|
|
|
fi
|
|
|
|
ibv_ver_str="$(basename $ibv_lib_file)"
|
|
|
|
ibv_maj_ver=`echo $ibv_ver_str | cut -d. -f3`
|
|
|
|
ibv_min_ver=`echo $ibv_ver_str | cut -d. -f4`
|
|
|
|
if [[ "$ibv_maj_var" > 1 || ("$ibv_maj_ver" -eq 1 && "$ibv_min_ver" -ge 1) ]]; then
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RDMA_SEND_WITH_INVAL]="y"
|
2018-08-15 20:09:49 +00:00
|
|
|
else
|
2018-10-03 14:58:36 +00:00
|
|
|
CONFIG[RDMA_SEND_WITH_INVAL]="n"
|
2018-08-22 16:31:54 +00:00
|
|
|
echo "
|
2018-08-15 20:09:49 +00:00
|
|
|
*******************************************************************************
|
|
|
|
WARNING: The Infiniband Verbs opcode Send With Invalidate is either not
|
|
|
|
supported or is not functional with the current version of libibverbs installed
|
|
|
|
on this system. Please upgrade to at least version 1.1.
|
|
|
|
|
|
|
|
Beginning with Linux kernel 4.14, the kernel NVMe-oF initiator leverages Send
|
|
|
|
With Invalidate RDMA operations to improve performance. Failing to use the
|
|
|
|
Send With Invalidate operation on the NVMe-oF target side results in full
|
|
|
|
functionality, but greatly reduced performance. The SPDK NVMe-oF target will
|
|
|
|
be unable to leverage that operation using the currently installed version
|
|
|
|
of libibverbs, so Linux kernel NVMe-oF initiators based on kernels greater
|
|
|
|
than or equal to 4.14 will see significantly reduced performance.
|
2018-08-22 16:31:54 +00:00
|
|
|
*******************************************************************************"
|
2018-08-15 20:09:49 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-10-03 14:58:36 +00:00
|
|
|
if [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
|
2018-03-07 23:44:06 +00:00
|
|
|
echo NOTE: Crypto is currently marked as experimental. Do not use in production.
|
2018-08-18 16:25:41 +00:00
|
|
|
set +e
|
|
|
|
nasm_ver=$(nasm -v | sed 's/[^0-9]*//g' | awk '{print substr ($0, 0, 5)}')
|
|
|
|
ipsec="$(find /usr -name intel-ipsec-mb.h 2>/dev/null)"
|
|
|
|
set -e
|
|
|
|
if [[ $nasm_ver -lt "21202" ]]; then
|
|
|
|
echo Crypto requires NASM version 2.12.02 or newer. Please install
|
2018-08-28 19:55:04 +00:00
|
|
|
echo or upgrade then re-run this script.
|
|
|
|
exit 1
|
2018-08-18 16:25:41 +00:00
|
|
|
else
|
|
|
|
if [[ "$ipsec" == "" ]]; then
|
|
|
|
echo "To enable crypto you must first go to the intel-ipsec-mb directory and "
|
|
|
|
echo "run 'make' then 'sudo make install' then re-run this script."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2018-08-15 20:09:49 +00:00
|
|
|
|
2017-04-03 21:01:12 +00:00
|
|
|
echo -n "Creating CONFIG.local..."
|
2018-10-03 14:58:36 +00:00
|
|
|
cp -f CONFIG CONFIG.local
|
|
|
|
for key in ${!CONFIG[@]}; do
|
|
|
|
sed -i.bak -r "s#^\s*CONFIG_${key}\?=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" CONFIG.local
|
|
|
|
done
|
|
|
|
# On FreeBSD sed -i 'SUFFIX' - SUFFIX is mandatory. So no way but to delete the backed file.
|
|
|
|
rm -f CONFIG.local.bak
|
2017-03-30 19:06:49 +00:00
|
|
|
|
2018-03-28 18:24:48 +00:00
|
|
|
# Environment variables
|
|
|
|
if [ -n "$CFLAGS" ]; then
|
|
|
|
echo "CFLAGS?=$CFLAGS" >> CONFIG.local
|
|
|
|
fi
|
|
|
|
if [ -n "$CXXFLAGS" ]; then
|
|
|
|
echo "CXXFLAGS?=$CXXFLAGS" >> CONFIG.local
|
|
|
|
fi
|
|
|
|
if [ -n "$LDFLAGS" ]; then
|
|
|
|
echo "LDFLAGS?=$LDFLAGS" >> CONFIG.local
|
|
|
|
fi
|
|
|
|
if [ -n "$DESTDIR" ]; then
|
|
|
|
echo "DESTDIR?=$DESTDIR" >> CONFIG.local
|
|
|
|
fi
|
|
|
|
|
2017-04-03 21:01:12 +00:00
|
|
|
echo "done."
|
2018-08-14 17:56:26 +00:00
|
|
|
if [[ "$OSTYPE" == "freebsd"* ]]; then
|
2017-07-13 18:01:45 +00:00
|
|
|
echo "Type 'gmake' to build."
|
2017-05-28 19:35:46 +00:00
|
|
|
else
|
2017-07-13 18:01:45 +00:00
|
|
|
echo "Type 'make' to build."
|
2017-05-28 19:35:46 +00:00
|
|
|
fi
|
2017-03-30 19:06:49 +00:00
|
|
|
|
|
|
|
exit 0
|