summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-03-13 21:32:17 +0100
committerDave Barach <openvpp@barachs.net>2018-03-14 16:38:06 +0000
commitd1274cb207a48f0142a5a6cbcd22d61c22dbc230 (patch)
treebad838ef9e2d89271f7222b341935f6d1958af8a /src/vlib/threads.c
parent1f15facc74b1313dd680cf20eb6f490cc743b2a1 (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/threads.c')
-rw-r--r--src/vlib/threads.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 3edf1ebbc62..50056462d1a 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -783,7 +783,6 @@ start_workers (vlib_main_t * vm)
for (i = 0; i < vec_len (tm->registrations); i++)
{
vlib_node_main_t *nm, *nm_clone;
- vlib_buffer_main_t *bm_clone;
vlib_buffer_free_list_t *fl_clone, *fl_orig;
vlib_buffer_free_list_t *orig_freelist_pool;
int k;
@@ -919,19 +918,16 @@ start_workers (vlib_main_t * vm)
vec_dup (vlib_mains[0]->error_main.counters_last_clear);
/* Fork the vlib_buffer_main_t free lists, etc. */
- bm_clone = vec_dup (vm_clone->buffer_main);
- vm_clone->buffer_main = bm_clone;
-
- orig_freelist_pool = bm_clone->buffer_free_list_pool;
- bm_clone->buffer_free_list_pool = 0;
+ orig_freelist_pool = vm_clone->buffer_free_list_pool;
+ vm_clone->buffer_free_list_pool = 0;
/* *INDENT-OFF* */
pool_foreach (fl_orig, orig_freelist_pool,
({
- pool_get_aligned (bm_clone->buffer_free_list_pool,
+ pool_get_aligned (vm_clone->buffer_free_list_pool,
fl_clone, CLIB_CACHE_LINE_BYTES);
ASSERT (fl_orig - orig_freelist_pool
- == fl_clone - bm_clone->buffer_free_list_pool);
+ == fl_clone - vm_clone->buffer_free_list_pool);
fl_clone[0] = fl_orig[0];
fl_clone->buffers = 0;