summaryrefslogtreecommitdiffstats
path: root/src/plugins/flowperpkt/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/flowperpkt/node.c')
-rw-r--r--src/plugins/flowperpkt/node.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/flowperpkt/node.c b/src/plugins/flowperpkt/node.c
index 0277682dc87..9bac4166a97 100644
--- a/src/plugins/flowperpkt/node.c
+++ b/src/plugins/flowperpkt/node.c
@@ -101,7 +101,7 @@ add_to_flow_record_ipv4 (vlib_main_t * vm,
u32 src_address, u32 dst_address,
u8 tos, u64 timestamp, u16 length, int do_flush)
{
- u32 my_cpu_number = vm->thread_index;
+ u32 my_thread_index = vm->thread_index;
flow_report_main_t *frm = &flow_report_main;
ip4_header_t *ip;
udp_header_t *udp;
@@ -115,7 +115,7 @@ add_to_flow_record_ipv4 (vlib_main_t * vm,
vlib_buffer_free_list_t *fl;
/* Find or allocate a buffer */
- b0 = fm->ipv4_buffers_per_worker[my_cpu_number];
+ b0 = fm->ipv4_buffers_per_worker[my_thread_index];
/* Need to allocate a buffer? */
if (PREDICT_FALSE (b0 == 0))
@@ -129,7 +129,7 @@ add_to_flow_record_ipv4 (vlib_main_t * vm,
return;
/* Initialize the buffer */
- b0 = fm->ipv4_buffers_per_worker[my_cpu_number] =
+ b0 = fm->ipv4_buffers_per_worker[my_thread_index] =
vlib_get_buffer (vm, bi0);
fl =
vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
@@ -141,16 +141,16 @@ add_to_flow_record_ipv4 (vlib_main_t * vm,
{
/* use the current buffer */
bi0 = vlib_get_buffer_index (vm, b0);
- offset = fm->ipv4_next_record_offset_per_worker[my_cpu_number];
+ offset = fm->ipv4_next_record_offset_per_worker[my_thread_index];
}
/* Find or allocate a frame */
- f = fm->ipv4_frames_per_worker[my_cpu_number];
+ f = fm->ipv4_frames_per_worker[my_thread_index];
if (PREDICT_FALSE (f == 0))
{
u32 *to_next;
f = vlib_get_frame_to_node (vm, ip4_lookup_node.index);
- fm->ipv4_frames_per_worker[my_cpu_number] = f;
+ fm->ipv4_frames_per_worker[my_thread_index] = f;
/* Enqueue the buffer */
to_next = vlib_frame_vector_args (f);
@@ -300,13 +300,13 @@ add_to_flow_record_ipv4 (vlib_main_t * vm,
}
vlib_put_frame_to_node (vm, ip4_lookup_node.index,
- fm->ipv4_frames_per_worker[my_cpu_number]);
- fm->ipv4_frames_per_worker[my_cpu_number] = 0;
- fm->ipv4_buffers_per_worker[my_cpu_number] = 0;
+ fm->ipv4_frames_per_worker[my_thread_index]);
+ fm->ipv4_frames_per_worker[my_thread_index] = 0;
+ fm->ipv4_buffers_per_worker[my_thread_index] = 0;
offset = 0;
}
- fm->ipv4_next_record_offset_per_worker[my_cpu_number] = offset;
+ fm->ipv4_next_record_offset_per_worker[my_thread_index] = offset;
}
void