Skip to content

Commit

Permalink
dpdk: updated build to automatically download Intel(R) Multi-Buffer C…
Browse files Browse the repository at this point in the history
…rypto for IPsec Library

Change-Id: I58182edb7b0d314bb6dfa1daf7b00012196fd3e1
Signed-off-by: Radu Nicolau <[email protected]>
  • Loading branch information
rnicolau authored and Damjan Marion committed Feb 20, 2017
1 parent 52456fc commit 6ca42d3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions dpdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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 $@

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ca42d3

Please sign in to comment.