aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vlib/vlib/dpdk_buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vlib/vlib/dpdk_buffer.c b/vlib/vlib/dpdk_buffer.c
index 68c1fcdb4b6..43612a86d1c 100644
--- a/vlib/vlib/dpdk_buffer.c
+++ b/vlib/vlib/dpdk_buffer.c
@@ -401,11 +401,13 @@ del_free_list (vlib_main_t * vm, vlib_buffer_free_list_t * f)
for (i = 0; i < vec_len (f->unaligned_buffers); i++) {
b = vlib_get_buffer (vm, f->unaligned_buffers[i]);
mb = ((struct rte_mbuf *)b)-1;
+ ASSERT(rte_mbuf_refcnt_read(mb) == 1);
rte_pktmbuf_free (mb);
}
for (i = 0; i < vec_len (f->aligned_buffers); i++) {
b = vlib_get_buffer (vm, f->aligned_buffers[i]);
mb = ((struct rte_mbuf *)b)-1;
+ ASSERT(rte_mbuf_refcnt_read(mb) == 1);
rte_pktmbuf_free (mb);
}
vec_free (f->name);
@@ -723,6 +725,7 @@ vlib_buffer_free_inline (vlib_main_t * vm,
else
{
mb = ((struct rte_mbuf *)b)-1;
+ ASSERT(rte_mbuf_refcnt_read(mb) == 1);
rte_pktmbuf_free (mb);
}
}