summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-11-17 09:46:41 +0100
committerSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2017-11-20 11:41:22 +0000
commit45b485099d8bdf5985e9869bc8221852073f9369 (patch)
tree184c75dbe758a9606c16b89a56d4f62965c01663 /src/plugins/dpdk/buffer.c
parent9d1d73a9010dcd0929dc932af1fd7117863f6758 (diff)
dpdk: add support for DPDK 17.11
Also remove DPDK 17.05 support. Change-Id: I4f96cb3f002cd90b12d800d6904f2364d7c4e270 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/buffer.c')
-rw-r--r--src/plugins/dpdk/buffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index d0e13ae001a..53afd11b530 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -502,7 +502,11 @@ 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);
@@ -519,9 +523,15 @@ 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);