aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/buffer_node.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-26 13:06:13 +0100
committerDamjan Marion <damarion@cisco.com>2021-03-26 16:33:21 +0100
commit6ffb7c61899eb782416cbd2f117042a583f189f7 (patch)
treef6bd132d53b0aded6b235d13200dba2864afc7d8 /src/vlib/buffer_node.h
parent83f13e45bcd4b1018aa29bb6f32324c32f3a11a8 (diff)
vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer_node.h')
-rw-r--r--src/vlib/buffer_node.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vlib/buffer_node.h b/src/vlib/buffer_node.h
index 0fa18d6dde2..17eb54e48be 100644
--- a/src/vlib/buffer_node.h
+++ b/src/vlib/buffer_node.h
@@ -545,7 +545,8 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
{
hf->n_vectors = VLIB_FRAME_SIZE;
vlib_put_frame_queue_elt (hf);
- vlib_mains[current_thread_index]->check_frame_queues = 1;
+ vlib_get_main_by_index (current_thread_index)->check_frame_queues =
+ 1;
current_thread_index = ~0;
ptd->handoff_queue_elt_by_thread_index[next_thread_index] = 0;
hf = 0;
@@ -574,7 +575,7 @@ vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
if (1 || hf->n_vectors == hf->last_n_vectors)
{
vlib_put_frame_queue_elt (hf);
- vlib_mains[i]->check_frame_queues = 1;
+ vlib_get_main_by_index (i)->check_frame_queues = 1;
ptd->handoff_queue_elt_by_thread_index[i] = 0;
}
else