aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/flowperpkt
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-10 21:06:28 +0200
committerDave Barach <openvpp@barachs.net>2017-05-10 22:01:15 +0000
commitf55f9b851f59264d737d92c6277a87588c565d24 (patch)
tree4e1c69bed3ff6b0968b9558a814a23edac4f9ae6 /src/plugins/flowperpkt
parente5f1d27695e2e6b9be17198e9b49e95639a15c58 (diff)
completelly deprecate os_get_cpu_number, replace new occurences
Change-Id: I82c663bc0866c6c68ba354104b0bb059387f4b9d Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/flowperpkt')
-rw-r--r--src/plugins/flowperpkt/l2_node.c20
-rw-r--r--src/plugins/flowperpkt/node.c20
2 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/flowperpkt/l2_node.c b/src/plugins/flowperpkt/l2_node.c
index fdaf81d1a2e..db80e990352 100644
--- a/src/plugins/flowperpkt/l2_node.c
+++ b/src/plugins/flowperpkt/l2_node.c
@@ -102,7 +102,7 @@ add_to_flow_record_l2 (vlib_main_t * vm,
u8 * src_mac, u8 * dst_mac,
u16 ethertype, 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;
@@ -116,7 +116,7 @@ add_to_flow_record_l2 (vlib_main_t * vm,
vlib_buffer_free_list_t *fl;
/* Find or allocate a buffer */
- b0 = fm->l2_buffers_per_worker[my_cpu_number];
+ b0 = fm->l2_buffers_per_worker[my_thread_index];
/* Need to allocate a buffer? */
if (PREDICT_FALSE (b0 == 0))
@@ -130,7 +130,7 @@ add_to_flow_record_l2 (vlib_main_t * vm,
return;
/* Initialize the buffer */
- b0 = fm->l2_buffers_per_worker[my_cpu_number] =
+ b0 = fm->l2_buffers_per_worker[my_thread_index] =
vlib_get_buffer (vm, bi0);
fl =
vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
@@ -142,16 +142,16 @@ add_to_flow_record_l2 (vlib_main_t * vm,
{
/* use the current buffer */
bi0 = vlib_get_buffer_index (vm, b0);
- offset = fm->l2_next_record_offset_per_worker[my_cpu_number];
+ offset = fm->l2_next_record_offset_per_worker[my_thread_index];
}
/* Find or allocate a frame */
- f = fm->l2_frames_per_worker[my_cpu_number];
+ f = fm->l2_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->l2_frames_per_worker[my_cpu_number] = f;
+ fm->l2_frames_per_worker[my_thread_index] = f;
/* Enqueue the buffer */
to_next = vlib_frame_vector_args (f);
@@ -299,13 +299,13 @@ add_to_flow_record_l2 (vlib_main_t * vm,
}
vlib_put_frame_to_node (vm, ip4_lookup_node.index,
- fm->l2_frames_per_worker[my_cpu_number]);
- fm->l2_frames_per_worker[my_cpu_number] = 0;
- fm->l2_buffers_per_worker[my_cpu_number] = 0;
+ fm->l2_frames_per_worker[my_thread_index]);
+ fm->l2_frames_per_worker[my_thread_index] = 0;
+ fm->l2_buffers_per_worker[my_thread_index] = 0;
offset = 0;
}
- fm->l2_next_record_offset_per_worker[my_cpu_number] = offset;
+ fm->l2_next_record_offset_per_worker[my_thread_index] = offset;
}
void
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