summaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r--src/vlib/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index e1c871c2a2a..f8cfb0357fa 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -569,7 +569,7 @@ vlib_buffer_pool_create (vlib_main_t * vm, char *name, u32 data_size,
bp->data_size = data_size;
bp->numa_node = m->numa_node;
- vec_validate_aligned (bp->threads, vec_len (vlib_mains) - 1,
+ vec_validate_aligned (bp->threads, vlib_get_n_threads () - 1,
CLIB_CACHE_LINE_BYTES);
alloc_size = vlib_buffer_alloc_size (bm->ext_hdr_size, data_size);
@@ -673,7 +673,7 @@ vlib_buffer_worker_init (vlib_main_t * vm)
vec_foreach (bp, bm->buffer_pools)
{
clib_spinlock_lock (&bp->lock);
- vec_validate_aligned (bp->threads, vec_len (vlib_mains) - 1,
+ vec_validate_aligned (bp->threads, vlib_get_n_threads () - 1,
CLIB_CACHE_LINE_BYTES);
clib_spinlock_unlock (&bp->lock);
}