From 910d3694e8b22c9d14e5f2913d14ae149e184620 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 21 Jan 2019 11:48:34 +0100 Subject: buffers: major cleanup and improvements This patch introduces following changes: - deprecated free lists which are not used and not compatible with external buffer managers (i.e. DPDK) - introduces native support for per-numa buffer pools - significantly improves performance of buffer alloc and free Change-Id: I4a8e723ae47056717afd6cac0efe87cb731b5be7 Signed-off-by: Damjan Marion --- src/plugins/dpdk/device/device.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/plugins/dpdk/device/device.c') diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c index 86b9a50f41b..e3520fc720e 100644 --- a/src/plugins/dpdk/device/device.c +++ b/src/plugins/dpdk/device/device.c @@ -127,11 +127,9 @@ dpdk_validate_rte_mbuf (vlib_main_t * vm, vlib_buffer_t * b, mb->pkt_len = b->current_length; mb->data_off = VLIB_BUFFER_PRE_DATA_SIZE + b->current_data; first_mb->nb_segs++; - if (PREDICT_FALSE (b->n_add_refs)) - { - rte_mbuf_refcnt_update (mb, b->n_add_refs); - b->n_add_refs = 0; - } + if (PREDICT_FALSE (b->ref_count > 1)) + mb->pool = + dpdk_no_cache_mempool_by_buffer_pool_index[b->buffer_pool_index]; } } -- cgit 1.2.3-korg