vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()
[vpp.git] / src / vlib / buffer_node.h
index 0fa18d6..17eb54e 100644 (file)
@@ -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