build: add intel-ipsec-mb submodule
This is a dependency of the DPDK crypto framework. The submodule is currently set to our SPDK fork of the ipsec library which is based off of the library v0.48 tag, as required by DPDK plus one minor Makefile change on the 'spdk' branch of the fork. Also added is a configure option '--with-crypto' and the associated conditionals for building DPDK with or without the library dependency. The crypto vbdev patch will use this same configure option to determine DPDK opts as well as whether the crypto vbdev should be built or not. Change-Id: Ib1cfd15b63b29acf3c2f7345d0d7edfd94716620 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Signed-off-by: paul luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/404983 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
529f7f3b8e
commit
6118b85333
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "dpdk"]
|
||||
path = dpdk
|
||||
url = https://github.com/spdk/dpdk.git
|
||||
[submodule "intel-ipsec-mb"]
|
||||
path = intel-ipsec-mb
|
||||
url = https://github.com/spdk/intel-ipsec-mb.git
|
||||
|
@ -30,6 +30,9 @@ against SPDK easier.
|
||||
The static libraries are also still provided for users that prefer to link only the
|
||||
minimal set of components required.
|
||||
|
||||
A new configure option was added `--with-crypto` that, when set, will build the crypto
|
||||
vbdev as well as its dependencies.
|
||||
|
||||
### RPC
|
||||
|
||||
The `start_nbd_disk` RPC method now returns the path to the kernel NBD device node
|
||||
|
5
CONFIG
5
CONFIG
@ -99,5 +99,8 @@ CONFIG_VPP?=n
|
||||
# Requires libiscsi development libraries.
|
||||
CONFIG_ISCSI_INITIATOR?=n
|
||||
|
||||
#Build with raid
|
||||
# Build with raid
|
||||
CONFIG_RAID?=n
|
||||
|
||||
# Enable the dependencies for building the crypto vbdev
|
||||
CONFIG_CRYPTO?=n
|
||||
|
11
configure
vendored
11
configure
vendored
@ -31,6 +31,8 @@ function usage()
|
||||
echo " disable features and components."
|
||||
echo ""
|
||||
echo "Valid dependencies are listed below."
|
||||
echo " crypto Required to build vbdev crypto module."
|
||||
echo " No path required."
|
||||
echo " dpdk Optional. Uses dpdk submodule in spdk tree if not specified."
|
||||
echo " example: /usr/share/dpdk/x86_64-default-linuxapp-gcc"
|
||||
echo " fio Required to build fio_plugin."
|
||||
@ -164,6 +166,12 @@ for i in "$@"; do
|
||||
--without-dpdk)
|
||||
CONFIG_DPDK_DIR=
|
||||
;;
|
||||
--with-crypto)
|
||||
CONFIG_CRYPTO=y
|
||||
;;
|
||||
--without-crypto)
|
||||
CONFIG_CRYPTO=n
|
||||
;;
|
||||
--with-vhost)
|
||||
CONFIG_VHOST=y
|
||||
;;
|
||||
@ -303,6 +311,9 @@ fi
|
||||
if [ -n "$CONFIG_DPDK_DIR" ]; then
|
||||
echo "CONFIG_DPDK_DIR?=$CONFIG_DPDK_DIR" >> CONFIG.local
|
||||
fi
|
||||
if [ -n "$CONFIG_CRYPTO" ]; then
|
||||
echo "CONFIG_CRYPTO?=$CONFIG_CRYPTO" >> CONFIG.local
|
||||
fi
|
||||
if [ -n "$CONFIG_VHOST" ]; then
|
||||
echo "CONFIG_VHOST?=$CONFIG_VHOST" >> CONFIG.local
|
||||
fi
|
||||
|
@ -36,6 +36,32 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||
|
||||
.PHONY: all clean install
|
||||
|
||||
IPSEC_OPTS=SHARED=n
|
||||
INTEL_IPSEC_MB_LIB=
|
||||
CRYPTO_ENABLED=n
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO),y)
|
||||
ifeq ($(TARGET_MACHINE),x86_64)
|
||||
ifneq ($(wildcard $(SPDK_ROOT_DIR)/intel-ipsec-mb/README),)
|
||||
INTEL_IPSEC_MB_LIB=$(SPDK_ROOT_DIR)/intel-ipsec-mb/libIPSec_MB.a
|
||||
IPSEC_MB_CFLAGS = -fPIC
|
||||
CRYPTO_ENABLED = y
|
||||
DPDK_OPTS += AESNI_MULTI_BUFFER_LIB_PATH=$(SPDK_ROOT_DIR)/intel-ipsec-mb
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_CRYPTODEV=y
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=y
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_KVARGS=y
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CRYPTO_ENABLED),n)
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_CRYPTODEV=n
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=n
|
||||
DPDK_OPTS += CONFIG_RTE_LIBRTE_KVARGS=n
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_MACHINE),aarch64)
|
||||
DPDK_CONFIG := arm64-armv8a
|
||||
else
|
||||
@ -54,14 +80,17 @@ endif
|
||||
|
||||
ifeq ($(CC_TYPE),clang)
|
||||
DPDK_CONFIG := $(DPDK_CONFIG)-clang
|
||||
IPSEC_CC := clang
|
||||
else
|
||||
DPDK_CONFIG := $(DPDK_CONFIG)-gcc
|
||||
IPSEC_CC := gcc
|
||||
endif
|
||||
|
||||
DPDK_CFLAGS = -fPIC
|
||||
|
||||
ifeq ($(CONFIG_DEBUG),y)
|
||||
DPDK_CFLAGS += -O0 -g
|
||||
IPSEC_OPTS += DEBUG=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WERROR),y)
|
||||
@ -70,13 +99,20 @@ else
|
||||
DPDK_CFLAGS += -Wno-error
|
||||
endif
|
||||
|
||||
$(SPDK_ROOT_DIR)/dpdk/build:
|
||||
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk config T=$(DPDK_CONFIG)
|
||||
$(SPDK_ROOT_DIR)/dpdk/build: $(INTEL_IPSEC_MB_LIB)
|
||||
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk config T=$(DPDK_CONFIG) $(DPDK_OPTS)
|
||||
|
||||
all: $(SPDK_ROOT_DIR)/dpdk/build
|
||||
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" MAKEFLAGS="T=$(DPDK_CONFIG) -j$(NPROC)"
|
||||
all: $(SPDK_ROOT_DIR)/dpdk/build $(INTEL_IPSEC_MB_LIB)
|
||||
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" MAKEFLAGS="T=$(DPDK_CONFIG) -j$(NPROC)" $(DPDK_OPTS)
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO),y)
|
||||
$(SPDK_ROOT_DIR)/intel-ipsec-mb/libIPSec_MB.a:
|
||||
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/intel-ipsec-mb EXTRA_CFLAGS="$(IPSEC_MB_CFLAGS)" $(IPSEC_OPTS) MAKEFLAGS="j$(NPROC)" CC=$(IPSEC_CC)
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build
|
||||
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build; \
|
||||
rm -rf $(SPDK_ROOT_DIR)/intel-ipsec-mb/obj/*; \
|
||||
rm -rf $(SPDK_ROOT_DIR)/intel-ipsec-mb/libIPSec_MB.a
|
||||
|
||||
install: all
|
||||
|
1
intel-ipsec-mb
Submodule
1
intel-ipsec-mb
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 60a1f479c20d5374b7efe333e3c1b6c908d66d7d
|
Loading…
Reference in New Issue
Block a user