bdev/compress: Add configure option and build dependencies

Includes the required DPDK dependencies for SPDK block Reduce aka
Compression.

Change-Id: Ic1ea3cbeb9373a7700f6f0c2a3194d65d6a34a41
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/429523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
paul luse 2018-10-15 16:46:41 -04:00 committed by Ben Walker
parent d08d6e129e
commit d9d4e40dd2
5 changed files with 40 additions and 7 deletions

2
CONFIG
View File

@ -96,7 +96,7 @@ CONFIG_VIRTIO=y
CONFIG_PMDK=n
CONFIG_PMDK_DIR=
# Build with "reduce" (SPDK block compression)
# Enable the dependencies for building the compress vbdev
CONFIG_REDUCE=n
# Build with VPP

11
configure vendored
View File

@ -48,7 +48,7 @@ function usage()
echo " No path required."
echo " pmdk Required to build persistent memory bdev."
echo " example: /usr/share/pmdk"
echo " reduce Required to build \"reduce\" (SPDK block compression)."
echo " reduce Required to build vbdev compression module."
echo " No path required."
echo " vpp Required to build VPP net module."
echo " example: /vpp_repo/build-root/install-vpp-native/vpp"
@ -300,6 +300,11 @@ if [[ $arch != x86_64* ]]; then
CONFIG[ISAL]=n
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
rootdir=$(readlink -f $(dirname $0))
CONFIG[ENV]=$rootdir/lib/env_dpdk
@ -391,6 +396,7 @@ if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
CONFIG[ISAL]=n
CONFIG[CRYPTO]=n
CONFIG[IPSEC_MB]=n
CONFIG[REDUCE]=n
else
if [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
CONFIG[IPSEC_MB]=y
@ -406,8 +412,9 @@ if [[ "${CONFIG[ISAL]}" = "y" ]]; then
fi
if [[ "${CONFIG[RBD]}" = "y" ]]; then
echo "ISA-L and RBD cannot co-exist currently so disabling ISA-L."
echo "ISAL and RBD cannot co-exist currently so disabling ISAL and compression."
CONFIG[ISAL]=n
CONFIG[REDUCE]=n
else
cd $rootdir/isa-l
ISAL_LOG=/tmp/spdk-isal.log

View File

@ -65,6 +65,13 @@ DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n
endif
ifeq ($(CONFIG_REDUCE),y)
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=y
DPDK_CFLAGS += -I$(ISAL_DIR)/..
else
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=n
endif
ifeq ($(TARGET_MACHINE),aarch64)
DPDK_CONFIG := arm64-armv8a
else

View File

@ -78,11 +78,22 @@ ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_bus_pci.*))
DPDK_LIB_LIST += rte_bus_pci
endif
# There are some complex dependencies when using crypto, reduce or both so
# here we add the feature specific ones and set a flag to add the common
# ones after that.
DPDK_FRAMEWORK=n
ifeq ($(CONFIG_CRYPTO),y)
DPDK_LIB_LIST += rte_cryptodev rte_reorder rte_bus_vdev rte_pmd_aesni_mb rte_pmd_qat rte_mbuf
# crypto doesn't need this lib but because of DPDK API and PMD deps, we have to include it here
# or the qat PMD won't build because we always build the compressdev API
DPDK_LIB_LIST += rte_compressdev
DPDK_FRAMEWORK=y
DPDK_LIB_LIST += rte_pmd_aesni_mb rte_pmd_qat rte_reorder
endif
ifeq ($(CONFIG_REDUCE),y)
DPDK_FRAMEWORK=y
DPDK_LIB_LIST += rte_pmd_isal_comp
endif
ifeq ($(DPDK_FRAMEWORK),y)
DPDK_LIB_LIST += rte_cryptodev rte_compressdev rte_bus_vdev
endif
ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_kvargs.*))
@ -102,6 +113,10 @@ ifeq ($(CONFIG_IPSEC_MB),y)
ENV_LINKER_ARGS += -lIPSec_MB -L$(IPSEC_MB_DIR)
endif
ifeq ($(CONFIG_REDUCE),y)
ENV_LINKER_ARGS += -lisal -L$(ISAL_DIR)/.libs
endif
ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h))
ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_config.h))
ENV_LINKER_ARGS += -lnuma

View File

@ -204,6 +204,10 @@ if [ $SPDK_TEST_ISAL -eq 0 ]; then
config_params+=' --without-isal'
fi
if [ $SPDK_TEST_REDUCE -eq 0 ]; then
config_params+=' --without-reduce'
fi
export config_params
if [ -z "$output_dir" ]; then