aboutsummaryrefslogtreecommitdiffstats
path: root/vlib/vlib/dpdk_buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-07-13 22:44:18 +0200
committerDamjan Marion <damarion@cisco.com>2016-07-22 09:10:58 +0200
commit1f0da170e818a6991d841df47de0885da720b0c3 (patch)
tree900f90de63cd398cd80ff65182c6d815dd69d07d /vlib/vlib/dpdk_buffer.c
parent11bfc2f7f3896b7a539f662f1385516e653b3926 (diff)
Add DPDK 16.07 support (rc3 based)
DPDK vhost-user support is disabled due to significan changes in the DPDK vhost-user code which are not compatible with current VPP code. Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vlib/vlib/dpdk_buffer.c')
-rw-r--r--vlib/vlib/dpdk_buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vlib/vlib/dpdk_buffer.c b/vlib/vlib/dpdk_buffer.c
index 7e6e84247d5..84bca0f53d0 100644
--- a/vlib/vlib/dpdk_buffer.c
+++ b/vlib/vlib/dpdk_buffer.c
@@ -62,6 +62,7 @@
#include <rte_ring.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
+#include <rte_version.h>
#include <vlib/vlib.h>
@@ -989,7 +990,11 @@ vlib_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
if (rmp)
{
new_start = pointer_to_uword (rmp);
+#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0)
+ new_size = (uintptr_t)STAILQ_FIRST(&rmp->mem_list)->addr + STAILQ_FIRST(&rmp->mem_list)->len - new_start;
+#else
new_size = rmp->elt_va_end - new_start;
+#endif
if (vpm->virtual.size > 0)
{