summaryrefslogtreecommitdiffstats
path: root/dpdk
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2017-03-07 14:39:29 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-22 10:47:22 +0000
commitfa80f2e421e7e85f429437aad2da9971a2a60a24 (patch)
tree9d5d89f9cbf98a5f8755edb031825a697a90c215 /dpdk
parent7312cc7785a9d1198519e1091a645fecc019a6b8 (diff)
dpdk: fix plugin linking with sw crypto libraries
Change-Id: I3e3bf786ab3c7672ff2cc7acd221421072e3ac8b Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Diffstat (limited to 'dpdk')
-rw-r--r--dpdk/Makefile45
1 files changed, 26 insertions, 19 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile
index 8e187cc2f1d..fc93f9c6be0 100644
--- a/dpdk/Makefile
+++ b/dpdk/Makefile
@@ -25,7 +25,7 @@ DPDK_MLX5_PMD ?= n
B := $(DPDK_BUILD_DIR)
I := $(DPDK_INSTALL_DIR)
DPDK_VERSION ?= 17.02
-PKG_SUFFIX ?= vpp1
+PKG_SUFFIX ?= vpp2
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
@@ -34,9 +34,9 @@ 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 := v0.44-gcm.2.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
+AESNIMB_LIB_SOURCE := $(B)/intel-ipsec-mb-0.44-gcm.2
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
@@ -87,8 +87,8 @@ 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_EXTRA_CFLAGS += -I$(I)/include
+DPDK_EXTRA_LDFLAGS += -L$(I)/lib
DPDK_MAKE_EXTRA_ARGS += AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE)
endif
@@ -158,19 +158,27 @@ $(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)
+ @rm -f $(B)/.download.ok
+
+$(CURDIR)/$(AESNIMB_LIB_TARBALL):
@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) ; \
+ else curl -o $@ -LO $(AESNIMB_LIB_TARBALL_URL) ; \
fi
+
+$(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL):
@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) ; \
+ else curl -o $@ -LO $(ISA_L_CRYPTO_LIB_TARBALL_URL) ; \
fi
+
+DPDK_DOWNLOADS = $(CURDIR)/$(DPDK_TARBALL)
+ifeq ($(DPDK_CRYPTO_SW_PMD),y)
+DPDK_DOWNLOADS += $(CURDIR)/$(AESNIMB_LIB_TARBALL)
+DPDK_DOWNLOADS += $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL)
endif
- @rm -f $(B)/.download.ok
-$(B)/.download.ok: $(CURDIR)/$(DPDK_TARBALL)
+$(B)/.download.ok: $(DPDK_DOWNLOADS)
@mkdir -p $(B)
@openssl md5 $< | cut -f 2 -d " " - > $(B)/$(DPDK_TARBALL).md5sum
@([ "$$(<$(B)/$(DPDK_TARBALL).md5sum)" = "$(DPDK_$(DPDK_VERSION)_TARBALL_MD5_CKSUM)" ] || \
@@ -209,12 +217,6 @@ 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)
- @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 $@
@@ -223,11 +225,16 @@ 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/
- @cp $(ISA_L_CRYPTO_LIB_SOURCE)/.libs/libisal_crypto.a $(I)/lib/
+ # Build IPsec_MB library
+ mkdir -p $(I)/lib/
+ make -C $(AESNIMB_LIB_SOURCE) -j NO_GCM=y
+ cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/
+ # Build ISA-L Crypto library
+ cd $(ISA_L_CRYPTO_LIB_SOURCE) && ./autogen.sh && ./configure --prefix=$(I)
+ make -C $(ISA_L_CRYPTO_LIB_SOURCE) -j install
endif
+ @make $(DPDK_MAKE_ARGS) install
@touch $@
.PHONY: build