diff options
author | Damjan Marion <damarion@cisco.com> | 2018-03-13 21:32:17 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-03-14 16:38:06 +0000 |
commit | d1274cb207a48f0142a5a6cbcd22d61c22dbc230 (patch) | |
tree | bad838ef9e2d89271f7222b341935f6d1958af8a /src/vlib/main.c | |
parent | 1f15facc74b1313dd680cf20eb6f490cc743b2a1 (diff) |
vlib: internal buffer manager rework
- buffer_main is no longer part of vlib_main_t
- pool of free lists is still part of vlib_main_t
- mheap is not used anymore for buffer allocation
- simple bitmap bassed buffer alloc scheme is introduced
Change-Id: I3e1e6d00e2c8122293ed0a741245eb841315a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 5efeac26f79..d1f7592e502 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -460,7 +460,7 @@ vlib_put_next_frame (vlib_main_t * vm, vlib_frame_t *f; u32 n_vectors_in_frame; - if (vm->buffer_main->callbacks_registered == 0 && CLIB_DEBUG > 0) + if (buffer_main.callbacks_registered == 0 && CLIB_DEBUG > 0) vlib_put_next_frame_validate (vm, r, next_index, n_vectors_left); nf = vlib_node_runtime_get_next_frame (vm, r, next_index); @@ -1741,9 +1741,8 @@ vlib_main (vlib_main_t * volatile vm, unformat_input_t * input) goto done; /* Create default buffer free list. */ - vlib_buffer_get_or_create_free_list (vm, - VLIB_BUFFER_DEFAULT_FREE_LIST_BYTES, - "default"); + vlib_buffer_create_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_BYTES, + "default"); nm->timing_wheel = clib_mem_alloc_aligned (sizeof (TWT (tw_timer_wheel)), CLIB_CACHE_LINE_BYTES); |