avoid using thread local storage for thread index
[vpp.git] / src / vnet / devices / af_packet / node.c
index d74e56f..8dbd855 100644 (file)
@@ -191,7 +191,7 @@ af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
   u32 frame_num = apif->rx_req->tp_frame_nr;
   u8 *block_start = apif->rx_ring + block * block_size;
   uword n_trace = vlib_get_trace_count (vm, node);
-  u32 thread_index = vlib_get_thread_index ();
+  u32 thread_index = vm->thread_index;
   u32 n_buffer_bytes = vlib_buffer_free_list_buffer_size (vm,
                                                          VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
   u32 min_bufs = apif->rx_req->tp_frame_size / n_buffer_bytes;