diff options
author | Damjan Marion <damarion@cisco.com> | 2018-02-15 11:59:04 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-02-15 12:38:16 +0000 |
commit | 07510dd1a812fe064c8d44dd25e6c8a598a709cf (patch) | |
tree | c04ea244f766a4c3cd621473febfd0ef0f2d6b9c | |
parent | a43ccaefc3bd50c03c90f7c3bee02eac9709df56 (diff) |
dpdk: add support for DPDK 18.02, deprecate 17.08
17.11 is still default.
Change-Id: I524d232579db8a59c717c5d760398b6b7f811d03
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | dpdk/Makefile | 53 | ||||
-rw-r--r-- | src/plugins/dpdk/buffer.c | 10 | ||||
-rw-r--r-- | src/plugins/dpdk/device/dpdk.h | 6 | ||||
-rw-r--r-- | src/plugins/dpdk/device/format.c | 4 | ||||
-rw-r--r-- | src/plugins/dpdk/ipsec/ipsec.c | 4 |
5 files changed, 5 insertions, 72 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile index 869cac22f7b..844d641e204 100644 --- a/dpdk/Makefile +++ b/dpdk/Makefile @@ -29,8 +29,8 @@ PKG_SUFFIX ?= vpp1 DPDK_BASE_URL ?= http://fast.dpdk.org/rel DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL) -DPDK_17.08_TARBALL_MD5_CKSUM := 0641f59ea8ea98afefa7cfa2699f6241 DPDK_17.11_TARBALL_MD5_CKSUM := 53ee9e054a8797c9e67ffa0eb5d0c701 +DPDK_18.02_TARBALL_MD5_CKSUM := ca13077a014a2102c6e10153dfa3b920 DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION) MACHINE=$(shell uname -m) @@ -40,23 +40,14 @@ NASM_TARBALL := nasm-$(NASM_VER).tar.xz NASM_TAR_URL := $(NASM_BASE_URL)/$(NASM_VER)/$(NASM_TARBALL) NASM_SOURCE := $(B)/nasm-$(NASM_VER) -ISA_L_CRYPTO_LIB := n - -ifeq ($(DPDK_VERSION),17.08) -IPSEC_MB_VER ?= 0.46 -else +ifeq ($(DPDK_VERSION),17.11) IPSEC_MB_VER ?= 0.47 +else +IPSEC_MB_VER ?= 0.48 endif -ISA_L_CRYPTO_VER := 2.18.0 ifeq ($(MACHINE),$(filter $(MACHINE),x86_64)) AESNI ?= y -# DPDK pre 17.08 depends on ISA-L Crypto library for GCM PMD - ifneq ($(firstword $(sort $(DPDK_VERSION), 17.08)), 17.08) - ISA_L_CRYPTO_LIB = y - IPSEC_MB_VER = 0.45 - $(info Building ISA-L Crypto $(ISA_L_CRYPTO_VER) library) - endif $(info Building IPSec-MB $(IPSEC_MB_VER) library) else AESNI ?= N @@ -66,11 +57,6 @@ AESNIMB_LIB_TARBALL := v$(IPSEC_MB_VER).tar.gz AESNIMB_LIB_TARBALL_URL := http://github.com/01org/intel-ipsec-mb/archive/$(AESNIMB_LIB_TARBALL) AESNIMB_LIB_SOURCE := $(B)/intel-ipsec-mb-$(IPSEC_MB_VER) -ISA_L_CRYPTO_LIB_TARBALL := v$(ISA_L_CRYPTO_VER).tar.gz -ISA_L_CRYPTO_LIB_TARBALL_URL := http://github.com/01org/isa-l_crypto/archive/$(ISA_L_CRYPTO_LIB_TARBALL) -ISA_L_CRYPTO_LIB_SOURCE := $(B)/isa-l_crypto-$(ISA_L_CRYPTO_VER) -ISA_L_CRYPTO_INSTALL_DIR := $(ISA_L_CRYPTO_LIB_SOURCE)/install - ifneq (,$(findstring clang,$(CC))) DPDK_CC=clang else ifneq (,$(findstring icc,$(CC))) @@ -163,10 +149,6 @@ else DPDK_EXTRA_CFLAGS := -g -O0 endif -ifeq ($(ISA_L_CRYPTO_LIB),y) -DPDK_EXTRA_CFLAGS += -I$(ISA_L_CRYPTO_INSTALL_DIR)/include -Wl,-z,muldefs -DPDK_EXTRA_LDFLAGS += -L$(I)/lib -endif DPDK_MAKE_EXTRA_ARGS += AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE) # assemble DPDK make arguments @@ -248,20 +230,11 @@ $(CURDIR)/$(AESNIMB_LIB_TARBALL): 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 $@ -LO $(ISA_L_CRYPTO_LIB_TARBALL_URL) ; \ - fi - DPDK_DOWNLOADS = $(CURDIR)/$(DPDK_TARBALL) ifeq ($(AESNI),y) DPDK_DOWNLOADS += $(CURDIR)/$(NASM_TARBALL) DPDK_DOWNLOADS += $(CURDIR)/$(AESNIMB_LIB_TARBALL) endif -ifeq ($(ISA_L_CRYPTO_LIB),y) -DPDK_DOWNLOADS += $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL) -endif $(B)/.download.ok: $(DPDK_DOWNLOADS) @mkdir -p $(B) @@ -283,10 +256,6 @@ ifeq ($(AESNI),y) @echo --- extracting $(AESNIMB_LIB_TARBALL) --- @tar --directory $(B) --extract --file $(CURDIR)/$(AESNIMB_LIB_TARBALL) endif -ifeq ($(ISA_L_CRYPTO_LIB),y) - @echo --- extracting $(ISA_L_CRYPTO_LIB_TARBALL) --- - @tar --directory $(B) --extract --file $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL) -endif @touch $@ .PHONY: extract @@ -320,19 +289,10 @@ build-nasm: build-ipsec-mb: mkdir -p $(I)/lib/ # Do not build GCM stuff if we are building ISA_L - make -C $(AESNIMB_LIB_SOURCE) -j NO_GCM=$(ISA_L_CRYPTO_LIB) \ + make -C $(AESNIMB_LIB_SOURCE) -j \ DEBUG=$(DPDK_DEBUG) EXTRA_CFLAGS=-fPIC NASM=$(NASM_SOURCE)/nasm cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/ -.PHONY: build-isal-crypto -build-isal-crypto: - mkdir -p $(I)/lib/ - cd $(ISA_L_CRYPTO_LIB_SOURCE) && ./autogen.sh && \ - ./configure --prefix=$(ISA_L_CRYPTO_INSTALL_DIR) \ - --libdir=$(ISA_L_CRYPTO_INSTALL_DIR)/lib CFLAGS='-fPIC -DPIC -O2' - make -C $(ISA_L_CRYPTO_LIB_SOURCE) -j install - cp $(ISA_L_CRYPTO_INSTALL_DIR)/lib/libisal_crypto.a $(I)/lib/ - .PHONY: build-dpdk build-dpdk: @if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi @@ -343,9 +303,6 @@ ifeq ($(AESNI),y) BUILD_TARGETS += build-nasm BUILD_TARGETS += build-ipsec-mb endif -ifeq ($(ISA_L_CRYPTO_LIB),y) -BUILD_TARGETS += build-isal-crypto -endif BUILD_TARGETS += build-dpdk $(B)/.build.ok: $(BUILD_TARGETS) diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c index 01ec1ac1f3c..7b17578f68d 100644 --- a/src/plugins/dpdk/buffer.c +++ b/src/plugins/dpdk/buffer.c @@ -471,11 +471,7 @@ dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size, i32 ret; obj_size = rte_mempool_calc_obj_size (elt_size, 0, 0); -#if RTE_VERSION < RTE_VERSION_NUM(17, 11, 0, 0) - size = rte_mempool_xmem_size (num_elts, obj_size, 21); -#else size = rte_mempool_xmem_size (num_elts, obj_size, 21, 0); -#endif error = vlib_physmem_region_alloc (vm, (i8 *) pool_name, size, numa, 0, pri); @@ -492,15 +488,9 @@ dpdk_pool_create (vlib_main_t * vm, u8 * pool_name, u32 elt_size, rte_mempool_set_ops_byname (mp, RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); -#if RTE_VERSION < RTE_VERSION_NUM(17, 11, 0, 0) - ret = - rte_mempool_populate_phys_tab (mp, pr->mem, pr->page_table, pr->n_pages, - pr->log2_page_size, NULL, NULL); -#else ret = rte_mempool_populate_iova_tab (mp, pr->mem, pr->page_table, pr->n_pages, pr->log2_page_size, NULL, NULL); -#endif if (ret != (i32) mp->size) { rte_mempool_free (mp); diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h index 5313a248428..4f4a2e590b2 100644 --- a/src/plugins/dpdk/device/dpdk.h +++ b/src/plugins/dpdk/device/dpdk.h @@ -39,9 +39,7 @@ #include <rte_eth_bond.h> #include <rte_sched.h> #include <rte_net.h> -#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 0) #include <rte_bus_pci.h> -#endif #include <vnet/unix/pcap.h> #include <vnet/devices/devices.h> @@ -119,11 +117,7 @@ typedef struct u64 tx_tail; } tx_ring_hdr_t; -#if RTE_VERSION < RTE_VERSION_NUM(17, 11, 0, 0) -typedef uint8_t dpdk_portid_t; -#else typedef uint16_t dpdk_portid_t; -#endif typedef struct { diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index d9ee2bd2b83..d661fa72f1c 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -79,10 +79,6 @@ _(DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM, "outer-ipv4-cksum") \ _(DEV_TX_OFFLOAD_QINQ_INSERT, "qinq-insert") -#if RTE_VERSION < RTE_VERSION_NUM(17, 11, 0, 0) -#define PKT_RX_VLAN PKT_RX_VLAN_PKT -#endif - #define foreach_dpdk_pkt_rx_offload_flag \ _ (PKT_RX_VLAN, "RX packet is a 802.1q VLAN packet") \ _ (PKT_RX_RSS_HASH, "RX packet with RSS hash result") \ diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index bf5d5bf019d..3dce075725b 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -806,11 +806,7 @@ crypto_op_init (struct rte_mempool *mempool, op->sess_type = RTE_CRYPTO_OP_WITH_SESSION; op->type = RTE_CRYPTO_OP_TYPE_SYMMETRIC; op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED; -#if RTE_VERSION < RTE_VERSION_NUM(17, 11, 0, 0) - op->phys_addr = rte_mempool_virt2phy (NULL, _obj); -#else op->phys_addr = rte_mempool_virt2iova (_obj); -#endif op->mempool = mempool; } |