aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-17 13:58:07 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-05-17 17:00:11 +0000
commit3291ecaec66158ba9743e67b7f183cf659f0e8b5 (patch)
treeda89ceac96aa03c04dc54f245ce819cd620d8c03 /src/plugins/dpdk
parentcb9ab47fd388c237fe0bad53d07e99096d338ac8 (diff)
dpdk: Do not check and set rte_mbuf refcnt if dpdk ver >= 17.05
According to DPDK release notes this is done by DPDK. Also, it fixes assers in debug image. Change-Id: Ida1d25f8cd0c2232110e44eabd7dc3e512336758 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index 2d4762ab..fd1d8415 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -213,6 +213,7 @@ fill_free_list (vlib_main_t * vm,
mb2 = vm->mbuf_alloc_list[i + 2];
mb3 = vm->mbuf_alloc_list[i + 3];
+#if RTE_VERSION < RTE_VERSION_NUM(17, 5, 0, 0)
ASSERT (rte_mbuf_refcnt_read (mb0) == 0);
ASSERT (rte_mbuf_refcnt_read (mb1) == 0);
ASSERT (rte_mbuf_refcnt_read (mb2) == 0);
@@ -222,6 +223,7 @@ fill_free_list (vlib_main_t * vm,
rte_mbuf_refcnt_set (mb1, 1);
rte_mbuf_refcnt_set (mb2, 1);
rte_mbuf_refcnt_set (mb3, 1);
+#endif
b0 = vlib_buffer_from_rte_mbuf (mb0);
b1 = vlib_buffer_from_rte_mbuf (mb1);
@@ -257,8 +259,10 @@ fill_free_list (vlib_main_t * vm,
{
mb0 = vm->mbuf_alloc_list[i];
+#if RTE_VERSION < RTE_VERSION_NUM(17, 5, 0, 0)
ASSERT (rte_mbuf_refcnt_read (mb0) == 0);
rte_mbuf_refcnt_set (mb0, 1);
+#endif
b0 = vlib_buffer_from_rte_mbuf (mb0);
bi0 = vlib_get_buffer_index (vm, b0);