summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vlib/vlib/threads.c7
-rw-r--r--vlib/vlib/threads.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/vlib/vlib/threads.c b/vlib/vlib/threads.c
index a2ab0d84750..32ebdfe761d 100644
--- a/vlib/vlib/threads.c
+++ b/vlib/vlib/threads.c
@@ -631,7 +631,12 @@ static clib_error_t * start_workers (vlib_main_t * vm)
continue;
/* Allocate "to-worker-N" frame queue */
- fq = vlib_frame_queue_alloc (FRAME_QUEUE_NELTS);
+ if (tr->frame_queue_nelts) {
+ fq = vlib_frame_queue_alloc (tr->frame_queue_nelts);
+ } else {
+ fq = vlib_frame_queue_alloc (FRAME_QUEUE_NELTS);
+ }
+
vec_validate (vlib_frame_queues, worker_thread_index);
vlib_frame_queues[worker_thread_index] = fq;
diff --git a/vlib/vlib/threads.h b/vlib/vlib/threads.h
index ce93b2c67cb..f13d3768e42 100644
--- a/vlib/vlib/threads.h
+++ b/vlib/vlib/threads.h
@@ -37,6 +37,8 @@ typedef struct vlib_thread_registration_ {
int fixed_count;
u32 count;
int no_data_structure_clone;
+ u32 frame_queue_nelts;
+
/* All threads of this type run on pthreads */
int use_pthreads;
u32 first_index;