aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadu Nicolau <radu.nicolau@intel.com>2017-02-16 13:54:42 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-20 10:53:37 +0000
commit6ca42d333b247eaee4995a7f779a43759a81909e (patch)
tree31ab452057583daf9bdb525ac5c1695775a01f1a
parent52456fca3d922d71098d4c1aef8dcee6c5459f8c (diff)
dpdk: updated build to automatically download Intel(R) Multi-Buffer Crypto for IPsec Library
Change-Id: I58182edb7b0d314bb6dfa1daf7b00012196fd3e1 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
-rw-r--r--Makefile2
-rw-r--r--dpdk/Makefile22
-rw-r--r--src/Makefile.am2
3 files changed, 24 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bbbb2acfb7f..8122c6a4c38 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ endif
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
-DEB_DEPENDS += python-dev python-virtualenv python-pip lcov chrpath autoconf
+DEB_DEPENDS += python-dev python-virtualenv python-pip lcov chrpath autoconf nasm
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
else
diff --git a/dpdk/Makefile b/dpdk/Makefile
index bdd7993a135..f8f1ca133e0 100644
--- a/dpdk/Makefile
+++ b/dpdk/Makefile
@@ -33,6 +33,12 @@ 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)
+endif
ifneq (,$(findstring clang,$(CC)))
DPDK_CC=clang
@@ -144,6 +150,12 @@ $(CURDIR)/$(DPDK_TARBALL):
then cp $(DPDK_DOWNLOAD_DIR)/$(DPDK_TARBALL) $(CURDIR) ; \
else curl -o $(CURDIR)/$(DPDK_TARBALL) -LO $(DPDK_TAR_URL) ; \
fi
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+ @if [ -e $(DPDK_DOWNLOAD_DIR)/$(AESNIMB_LIB_TARBALL) ] ; \
+ then cp $(DPDK_DOWNLOAD_DIR)/$(AESNIMB_LIB_TARBALL) $(CURDIR) ; \
+ else curl -o $(CURDIR)/$(AESNIMB_LIB_TARBALL) -LO $(AESNIMB_LIB_TARBALL_URL) ; \
+ fi
+endif
@rm -f $(B)/.download.ok
$(B)/.download.ok: $(CURDIR)/$(DPDK_TARBALL)
@@ -160,6 +172,10 @@ download: $(B)/.download.ok
$(B)/.extract.ok: $(B)/.download.ok
@echo --- extracting $(DPDK_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(DPDK_TARBALL)
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+ @echo --- extracting $(AESNIMB_LIB_TARBALL) ---
+ @tar --directory $(B) --extract --file $(CURDIR)/$(AESNIMB_LIB_TARBALL)
+endif
@touch $@
.PHONY: extract
@@ -179,6 +195,9 @@ endif
patch: $(B)/.patch.ok
$(B)/.config.ok: $(B)/.patch.ok $(B)/custom-config
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+ @make -C $(AESNIMB_LIB_SOURCE)
+endif
@make $(DPDK_MAKE_ARGS) config
@touch $@
@@ -188,6 +207,9 @@ config: $(B)/.config.ok
$(B)/.build.ok: $(DPDK_SOURCE_FILES)
@if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi
@make $(DPDK_MAKE_ARGS) install
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+ @cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/
+endif
@touch $@
.PHONY: build
diff --git a/src/Makefile.am b/src/Makefile.am
index 7da86fcb673..a0e62dbdb5c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,7 +49,7 @@ else
DPDK_LD_FLAGS = -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive,-lm,-ldl
endif
if WITH_DPDK_CRYPTO_SW
-DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+DPDK_LD_ADD = -lIPSec_MB
endif
if WITH_DPDK_MLX5_PMD
DPDK_LD_FLAGS += -libverbs -lmlx5 -lnuma