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/avf/input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/avf/input.c') diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c index fc884ce39f6..beb5c052423 100644 --- a/src/plugins/avf/input.c +++ b/src/plugins/avf/input.c @@ -72,7 +72,9 @@ avf_rxq_refill (vlib_main_t * vm, vlib_node_runtime_t * node, avf_rxq_t * rxq, slot = (rxq->next - n_refill - 1) & mask; n_refill &= ~7; /* round to 8 */ - n_alloc = vlib_buffer_alloc_to_ring (vm, rxq->bufs, slot, size, n_refill); + n_alloc = + vlib_buffer_alloc_to_ring_from_pool (vm, rxq->bufs, slot, size, n_refill, + rxq->buffer_pool_index); if (PREDICT_FALSE (n_alloc != n_refill)) { @@ -368,6 +370,7 @@ no_more_desc: vnet_buffer (bt)->sw_if_index[VLIB_RX] = ad->sw_if_index; vnet_buffer (bt)->sw_if_index[VLIB_TX] = ~0; + bt->buffer_pool_index = rxq->buffer_pool_index; if (n_tail_desc) n_rx_bytes = avf_process_rx_burst (vm, node, ptd, n_rx_packets, 1); -- cgit 1.2.3-korg