aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-31 12:29:39 +0100
committerDamjan Marion <damarion@cisco.com>2019-01-31 12:33:16 +0100
commit24dcbe45209dfdbcf2f1851aa443e696fac050f2 (patch)
tree95613b567a5df9d6e73e95ade88689a6c0b5d0a2 /src/vlib/buffer.c
parentf6e9b014cbd0ba5a757565a6a0179065d7236463 (diff)
buffers: reinitialize metadata, add additional validation
- DPDK overwrites metadata as part of rte_pktmbuf_init(...) so we need reinitialize it - additional checks added to ensure ref_count is never < 1 Change-Id: Ida336f81c4723e8f2e0ad4a70cb7b1ecfff978a0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 3e194113675..701ddde2227 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -569,6 +569,7 @@ vlib_buffer_pool_create (vlib_main_t * vm, u8 index, char *name,
bi = vlib_get_buffer_index (vm, (vlib_buffer_t *) p);
vec_add1_aligned (bp->buffers, bi, CLIB_CACHE_LINE_BYTES);
+ vlib_get_buffer (vm, bi);
bp->n_buffers += 1;
}