aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk
diff options
context:
space:
mode:
authorRadu Nicolau <radu.nicolau@intel.com>2017-02-20 12:27:02 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-21 22:21:57 +0000
commit2e3677bb2085d4992f74156bdff8fe050ac9de24 (patch)
tree403ce371133cbdf0459a93c528ba4c481d1c1719 /dpdk
parent770e89e6b916319eedd91c6edf16f0d7e89f556c (diff)
cryptodev: Automatically download and build ISA-L Crypto library
Change-Id: I5454053461e6fb98e7f58f9562efde3590bb7cb5 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Diffstat (limited to 'dpdk')
-rw-r--r--dpdk/Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile
index f8f1ca133e0..f8c85c967dc 100644
--- a/dpdk/Makefile
+++ b/dpdk/Makefile
@@ -33,11 +33,14 @@ DPDK_16.07_TARBALL_MD5_CKSUM := 690a2bb570103e58d12f9806e8bf21be
DPDK_16.11_TARBALL_MD5_CKSUM := 06c1c577795360719d0b4fafaeee21e9
DPDK_17.02_TARBALL_MD5_CKSUM := 6b9f7387c35641f4e8dbba3e528f2376
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
+
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
AESNIMB_LIB_TARBALL := v0.44.tar.gz
AESNIMB_LIB_TARBALL_URL := http://github.com/01org/intel-ipsec-mb/archive/$(AESNIMB_LIB_TARBALL)
AESNIMB_LIB_SOURCE := $(B)/intel-ipsec-mb-0.44
-export AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE)
+ISA_L_CRYPTO_LIB_TARBALL := isa_l_crypto.tar.gz
+ISA_L_CRYPTO_LIB_TARBALL_URL := http://github.com/01org/isa-l_crypto/archive/master.tar.gz
+ISA_L_CRYPTO_LIB_SOURCE := $(B)/isa-l_crypto-master
endif
ifneq (,$(findstring clang,$(CC)))
@@ -84,6 +87,12 @@ else
DPDK_EXTRA_CFLAGS := -g -O0
endif
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+DPDK_EXTRA_CFLAGS += -I$(ISA_L_CRYPTO_LIB_SOURCE)
+DPDK_EXTRA_LDFLAGS += -L$(ISA_L_CRYPTO_LIB_SOURCE)/.libs
+DPDK_MAKE_EXTRA_ARGS += AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE)
+endif
+
# assemble DPDK make arguments
DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \
T=$(DPDK_TARGET) \
@@ -155,6 +164,10 @@ ifeq ($(DPDK_CRYPTO_SW_PMD),y)
then cp $(DPDK_DOWNLOAD_DIR)/$(AESNIMB_LIB_TARBALL) $(CURDIR) ; \
else curl -o $(CURDIR)/$(AESNIMB_LIB_TARBALL) -LO $(AESNIMB_LIB_TARBALL_URL) ; \
fi
+ @if [ -e $(DPDK_DOWNLOAD_DIR)/$(ISA_L_CRYPTO_LIB_TARBALL) ] ; \
+ then cp $(DPDK_DOWNLOAD_DIR)/$(ISA_L_CRYPTO_LIB_TARBALL) $(CURDIR) ; \
+ else curl -o $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL) -LO $(ISA_L_CRYPTO_LIB_TARBALL_URL) ; \
+ fi
endif
@rm -f $(B)/.download.ok
@@ -175,6 +188,8 @@ $(B)/.extract.ok: $(B)/.download.ok
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
@echo --- extracting $(AESNIMB_LIB_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(AESNIMB_LIB_TARBALL)
+ @echo --- extracting $(ISA_L_CRYPTO_LIB_TARBALL) ---
+ @tar --directory $(B) --extract --file $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL)
endif
@touch $@
@@ -197,6 +212,9 @@ patch: $(B)/.patch.ok
$(B)/.config.ok: $(B)/.patch.ok $(B)/custom-config
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
@make -C $(AESNIMB_LIB_SOURCE)
+ @cd $(ISA_L_CRYPTO_LIB_SOURCE) && ./autogen.sh && ./configure
+ @make -C $(ISA_L_CRYPTO_LIB_SOURCE)
+ @cp $(ISA_L_CRYPTO_LIB_SOURCE)/include $(ISA_L_CRYPTO_LIB_SOURCE)/isa-l_crypto -r
endif
@make $(DPDK_MAKE_ARGS) config
@touch $@
@@ -209,6 +227,7 @@ $(B)/.build.ok: $(DPDK_SOURCE_FILES)
@make $(DPDK_MAKE_ARGS) install
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
@cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/
+ @cp $(ISA_L_CRYPTO_LIB_SOURCE)/.libs/libisal_crypto.a $(I)/lib/
endif
@touch $@