From 07510dd1a812fe064c8d44dd25e6c8a598a709cf Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 15 Feb 2018 11:59:04 +0100 Subject: dpdk: add support for DPDK 18.02, deprecate 17.08 17.11 is still default. Change-Id: I524d232579db8a59c717c5d760398b6b7f811d03 Signed-off-by: Damjan Marion --- src/plugins/dpdk/buffer.c | 10 ---------- src/plugins/dpdk/device/dpdk.h | 6 ------ src/plugins/dpdk/device/format.c | 4 ---- src/plugins/dpdk/ipsec/ipsec.c | 4 ---- 4 files changed, 24 deletions(-) (limited to 'src/plugins') 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 #include #include -#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 0) #include -#endif #include #include @@ -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; } -- cgit 1.2.3-korg