Commit 19e2dc38 authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

configure: rename --with-reduce --with-vbdev-compress



This is in prep for adding a new compressDev accel_fw
module that will contain all of the DPDK compressDev specifics
on it, the vbdev will make calls to the accel_fw instead.

As the accel_fw has SW based compression, we want the configure
option to apply to building the vbdev module but not the accel_sw
software implementation or the upcoming compressdev module.

Renamed to "compress" as reduce is a term specific to the vbdev
implementation of the compression to be provided by the accel_fw
and thus the same reason why we leave the test flag called REDUCE
because it's controlling tests for the reduce library as well as
the vbdev module that is using reduce.  The flag does not apply
to the SW implementation of compression.

This does not affect upcoming accel_fw compressdev module, that
will have its own configure option.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: If8ed3e48e1e3dabcaad1cd161289e78122cd9d58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15179


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 0b7138e9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -128,11 +128,11 @@ CONFIG_PMDK_DIR=
# Build with xNVMe
CONFIG_XNVME=n

# Enable the dependencies for building the compress vbdev
CONFIG_REDUCE=n
# Enable the dependencies for building the compress vbdev, includes the reduce library
CONFIG_VBDEV_COMPRESS=n

# Enable mlx5_pci dpdk compress PMD, enabled automatically if CONFIG_REDUCE=y and libmlx5 exists
CONFIG_REDUCE_MLX5=n
# Enable mlx5_pci dpdk compress PMD, enabled automatically if CONFIG_VBDEV_COMPRESS=y and libmlx5 exists
CONFIG_VBDEV_COMPRESS_MLX5=n

# Enable mlx5_pci dpdk crypto PMD, enabled automatically if CONFIG_CRYPTO=y and libmlx5 exists
CONFIG_CRYPTO_MLX5=n
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ function build_native_dpdk() {
		export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$external_dpdk_base_dir/intel-ipsec-mb/$intel_ipsec_lib"
	fi

	if [[ "$SPDK_TEST_REDUCE" -eq 1 ]]; then
	if [[ "$SPDK_TEST_VBDEV_COMPRESS" -eq 1 ]]; then
		isal_dir="$external_dpdk_base_dir/isa-l"
		git clone --branch v2.29.0 --depth 1 https://github.com/intel/isa-l.git "$isal_dir"

+2 −2
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ if [ $SPDK_TEST_UNITTEST -eq 1 ]; then
fi

if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then
	if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_VBDEV_COMPRESS -eq 1 ]]; then
		if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
			./scripts/qat_setup.sh igb_uio
		else
@@ -324,7 +324,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
		run_test "vmd" ./test/vmd/vmd.sh
	fi

	if [ $SPDK_TEST_REDUCE -eq 1 ]; then
	if [ $SPDK_TEST_VBDEV_COMPRESS -eq 1 ]; then
		run_test "compress_qat" ./test/compress/compress.sh "qat"
		run_test "compress_isal" ./test/compress/compress.sh "isal"
	fi
+15 −15
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ function usage() {
	echo " --with-pmdk[=DIR]         Build persistent memory bdev.
					 example: /usr/share/pmdk"
	echo " --without-pmdk		 No path required."
	echo " --with-reduce             Build vbdev compression module."
	echo " --without-reduce          No path required."
	echo " --with-vbdev-compress     Build vbdev compression module and dependencies."
	echo " --without-vbdev-compress  No path required."
	echo " --with-rbd                Build Ceph RBD bdev module."
	echo " --without-rbd             No path required."
	echo " --with-rdma[=DIR]         Build RDMA transport for NVMf target and initiator."
@@ -531,11 +531,11 @@ for i in "$@"; do
		--without-pmdk)
			CONFIG[PMDK]=n
			;;
		--with-reduce)
			CONFIG[REDUCE]=y
		--with-vbdev-compress)
			CONFIG[VBDEV_COMPRESS]=y
			;;
		--without-reduce)
			CONFIG[REDUCE]=n
		--without-vbdev-compress)
			CONFIG[VBDEV_COMPRESS]=n
			;;
		--with-xnvme)
			CONFIG[XNVME]=y
@@ -899,41 +899,41 @@ function mlx5_build() {
	return 0
}

if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
if [[ "${CONFIG[VBDEV_COMPRESS]}" = "y" ]]; then
	if ! echo -e '#include <libpmem.h>\nint main(void) { return 0; }\n' \
		| "${BUILD_CMD[@]}" -lpmem - 2> /dev/null; then
		echo "--with-reduce requires libpmem."
		echo "--with-vbdev-compress requires libpmem."
		echo "Please install then re-run this script."
		exit 1
	fi
	# Try to enable mlx5 compress
	CONFIG[REDUCE_MLX5]="y"
	CONFIG[VBDEV_COMPRESS_MLX5]="y"

	# Check if libmlx5 exists to enable mlx5_pci compress PMD
	if ! mlx5_build; then
		echo "libmlx5 is not found, so disabling DPDK mlx5_pci compress PMD"
		CONFIG[REDUCE_MLX5]="n"
		CONFIG[VBDEV_COMPRESS_MLX5]="n"
	else
		if [[ "${CONFIG[DPDK_PKG_CONFIG]}" = "y" ]]; then
			# Check if librte_compress_mlx5 exists in DPDK package
			if [ ! -f "${CONFIG[DPDK_LIB_DIR]}"/librte_compress_mlx5.so ]; then
				echo "librte_compress_mlx5 is not found, so disabling DPDK mlx5_pci compress PMD"
				CONFIG[REDUCE_MLX5]="n"
				CONFIG[VBDEV_COMPRESS_MLX5]="n"
			fi
		else
			# Check DPDK version to determine if mlx5_pci driver is supported
			dpdk_ver=$(dpdk_version)
			if [[ $dpdk_ver = "none" ]]; then
				echo "Cannot get DPDK version, so disabling DPDK mlx5_pci compress PMD"
				CONFIG[REDUCE_MLX5]="n"
				CONFIG[VBDEV_COMPRESS_MLX5]="n"
			elif [[ -n $dpdk_ver ]] && lt "$dpdk_ver" 21.02.0; then
				# mlx5_pci for compress is supported by DPDK >- 21.02.0
				echo "DPDK version ${dpdk_ver} doesn't support mlx5_pci compress PMD"
				CONFIG[REDUCE_MLX5]="n"
				CONFIG[VBDEV_COMPRESS_MLX5]="n"
			elif [[ -n ${CONFIG[DPDK_LIB_DIR]} ]] && [ ! -f "${CONFIG[DPDK_LIB_DIR]}"/librte_compress_mlx5.so ]; then
				# This is only checked when --with-dpdk or --with-dpdk=* is used
				echo "librte_compress_mlx5 is not found, so disabling DPDK mlx5_pci compress PMD"
				CONFIG[REDUCE_MLX5]="n"
				CONFIG[VBDEV_COMPRESS_MLX5]="n"
			fi
		fi
	fi
@@ -1161,7 +1161,7 @@ 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
	CONFIG[VBDEV_COMPRESS]=n
fi

if [[ "${CONFIG[SMA]}" = "y" ]]; then
+5 −5
Original line number Diff line number Diff line
@@ -39,13 +39,13 @@ DPDK_LIBS += kvargs telemetry
# Governor required libs
DPDK_LIBS += power timer ethdev net

# common crypto/reduce drivers
ifeq ($(findstring y,$(CONFIG_CRYPTO)$(CONFIG_REDUCE)),y)
# common crypto/compress drivers
ifeq ($(findstring y,$(CONFIG_CRYPTO)$(CONFIG_VBDEV_COMPRESS)),y)
DPDK_DRIVERS += crypto/qat compress/qat common/qat
endif

# common mlx5 libs
ifeq ($(findstring y,$(CONFIG_CRYPTO_MLX5)$(CONFIG_REDUCE_MLX5)),y)
ifeq ($(findstring y,$(CONFIG_CRYPTO_MLX5)$(CONFIG_VBDEV_COMPRESS_MLX5)),y)
DPDK_DRIVERS += common/mlx5 bus/auxiliary
endif

@@ -63,9 +63,9 @@ DPDK_LDFLAGS += -L$(IPSEC_MB_DIR)
endif
endif

ifeq ($(CONFIG_REDUCE),y)
ifeq ($(CONFIG_VBDEV_COMPRESS),y)
DPDK_DRIVERS += compress compress/isal
ifeq ($(CONFIG_REDUCE_MLX5),y)
ifeq ($(CONFIG_VBDEV_COMPRESS_MLX5),y)
DPDK_DRIVERS += compress/mlx5
endif
DPDK_CFLAGS += -I$(ISAL_DIR)
Loading