X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=dpdk%2FMakefile;h=06ba1270ed1fb36e7911a23d95afd8ab4b9c02aa;hb=ed92925f4d5535d7dd3e6de058ae90af209d5a8f;hp=02b5b2107bb775dfa9e450d6a78fa988dcb88744;hpb=676112f81e52cd91c88a7ab985e957bd64baafd0;p=vpp.git diff --git a/dpdk/Makefile b/dpdk/Makefile index 02b5b2107bb..06ba1270ed1 100644 --- a/dpdk/Makefile +++ b/dpdk/Makefile @@ -18,39 +18,75 @@ DPDK_BUILD_DIR ?= $(CURDIR)/_build DPDK_INSTALL_DIR ?= $(CURDIR)/_install DPDK_PKTMBUF_HEADROOM ?= 128 DPDK_DOWNLOAD_DIR ?= $(HOME)/Downloads -DPDK_MARCH ?= native -DPDK_TUNE ?= generic DPDK_DEBUG ?= n DPDK_CRYPTO_SW_PMD ?= n +DPDK_MLX4_PMD ?= n DPDK_MLX5_PMD ?= n B := $(DPDK_BUILD_DIR) I := $(DPDK_INSTALL_DIR) -DPDK_VERSION ?= 16.11 -PKG_SUFFIX ?= vpp3 +DPDK_VERSION ?= 17.05 +PKG_SUFFIX ?= vpp5 DPDK_BASE_URL ?= http://fast.dpdk.org/rel DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL) -DPDK_16.07_TARBALL_MD5_CKSUM := 690a2bb570103e58d12f9806e8bf21be -DPDK_16.11_TARBALL_MD5_CKSUM := 06c1c577795360719d0b4fafaeee21e9 +DPDK_17.02_TARBALL_MD5_CKSUM := 6b9f7387c35641f4e8dbba3e528f2376 +DPDK_17.05_TARBALL_MD5_CKSUM := 0a68c31cd6a6cabeed0a4331073e4c05 DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION) +ifeq ($(DPDK_CRYPTO_SW_PMD),y) +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-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 +endif + ifneq (,$(findstring clang,$(CC))) DPDK_CC=clang +else ifneq (,$(findstring icc,$(CC))) +DPDK_CC=icc else DPDK_CC=gcc endif +MACHINE=$(shell uname -m) + +############################################################################## +# Intel x86 +############################################################################## +ifeq ($(MACHINE),$(filter $(MACHINE),x86_64 i686)) +DPDK_TARGET ?= $(MACHINE)-native-linuxapp-$(DPDK_CC) +DPDK_MACHINE ?= nhm +DPDK_TUNE ?= core-avx2 -ifeq (,$(DPDK_TARGET)) -DPDK_TARGET := x86_64-native-linuxapp-$(DPDK_CC) +############################################################################## +# Cavium ThunderX +############################################################################## +else ifneq (,$(findstring thunder,$(shell cat /sys/bus/pci/devices/0000:00:01.0/uevent | grep cavium))) +export CROSS="" +DPDK_TARGET ?= arm64-thunderx-linuxapp-$(DPDK_CC) +DPDK_MACHINE ?= thunderx +DPDK_TUNE ?= generic + +############################################################################## +# Unknown platofrm +############################################################################## +else +$(error unknown platform) endif -JOBS := $(shell grep processor /proc/cpuinfo | wc -l) +# /proc/cpuinfo does not exist on platforms without a /proc and on some +# platforms, notably inside containers, it has no content. In those cases +# we assume there's 1 processor; we use 2*ncpu for the -j option. +# NB: GNU Make 4.2 will let us use '$(file $(B)/$(DPDK_TARBALL).md5sum @([ "$$(<$(B)/$(DPDK_TARBALL).md5sum)" = "$(DPDK_$(DPDK_VERSION)_TARBALL_MD5_CKSUM)" ] || \ @@ -161,6 +200,12 @@ 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) + @echo --- extracting $(ISA_L_CRYPTO_LIB_TARBALL) --- + @tar --directory $(B) --extract --file $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL) +endif @touch $@ .PHONY: extract @@ -188,6 +233,15 @@ config: $(B)/.config.ok $(B)/.build.ok: $(DPDK_SOURCE_FILES) @if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi +ifeq ($(DPDK_CRYPTO_SW_PMD),y) + # 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 $@