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/vnet | |
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/vnet')
-rw-r--r-- | src/vnet/replication.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vnet/replication.c b/src/vnet/replication.c index 217aa76a4d2..21f5485e6c7 100644 --- a/src/vnet/replication.c +++ b/src/vnet/replication.c @@ -219,7 +219,7 @@ replication_recycle_callback (vlib_main_t * vm, vlib_buffer_free_list_t * fl) b0->flags |= VLIB_BUFFER_IS_RECYCLED; #if (CLIB_DEBUG > 0) - if (vm->buffer_main->callbacks_registered == 0) + if (buffer_main.callbacks_registered == 0) vlib_buffer_set_known_state (bi0, VLIB_BUFFER_KNOWN_ALLOCATED); #endif @@ -251,7 +251,6 @@ clib_error_t * replication_init (vlib_main_t * vm) { replication_main_t *rm = &replication_main; - vlib_buffer_main_t *bm = vm->buffer_main; vlib_buffer_free_list_t *fl; __attribute__ ((unused)) replication_context_t *ctx; vlib_thread_main_t *tm = vlib_get_thread_main (); @@ -262,7 +261,7 @@ replication_init (vlib_main_t * vm) vlib_buffer_create_free_list (vm, 1024 /* fictional */ , "replication-recycle"); - fl = pool_elt_at_index (bm->buffer_free_list_pool, rm->recycle_list_index); + fl = pool_elt_at_index (vm->buffer_free_list_pool, rm->recycle_list_index); fl->buffers_added_to_freelist_function = replication_recycle_callback; |