summaryrefslogtreecommitdiffstats
path: root/src/vnet
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/vnet
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/vnet')
-rw-r--r--src/vnet/dpo/interface_dpo.c8
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_adjacency.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/dpo/interface_dpo.c b/src/vnet/dpo/interface_dpo.c
index 50ca756f9da..8d700c23e46 100644
--- a/src/vnet/dpo/interface_dpo.c
+++ b/src/vnet/dpo/interface_dpo.c
@@ -231,7 +231,7 @@ interface_dpo_inline (vlib_main_t * vm,
vlib_frame_t * from_frame)
{
u32 n_left_from, next_index, * from, * to_next;
- u32 cpu_index = os_get_cpu_number();
+ u32 thread_index = vlib_get_thread_index ();
vnet_interface_main_t *im;
im = &vnet_get_main ()->interface_main;
@@ -274,13 +274,13 @@ interface_dpo_inline (vlib_main_t * vm,
vlib_increment_combined_counter (im->combined_sw_if_counters
+ VNET_INTERFACE_COUNTER_RX,
- cpu_index,
+ thread_index,
ido0->ido_sw_if_index,
1,
vlib_buffer_length_in_chain (vm, b0));
vlib_increment_combined_counter (im->combined_sw_if_counters
+ VNET_INTERFACE_COUNTER_RX,
- cpu_index,
+ thread_index,
ido1->ido_sw_if_index,
1,
vlib_buffer_length_in_chain (vm, b1));
@@ -331,7 +331,7 @@ interface_dpo_inline (vlib_main_t * vm,
/* Bump the interface's RX coutners */
vlib_increment_combined_counter (im->combined_sw_if_counters
+ VNET_INTERFACE_COUNTER_RX,
- cpu_index,
+ thread_index,
ido0->ido_sw_if_index,
1,
vlib_buffer_length_in_chain (vm, b0));
diff --git a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
index d5f3a28ac9d..7db1c9bbb72 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
@@ -302,7 +302,7 @@ lisp_gpe_increment_stats_counters (lisp_cp_main_t * lcm, ip_adjacency_t * adj,
/* compute payload length starting after GPE */
u32 bytes = b->current_length - (lisp_data - b->data - b->current_data);
- vlib_increment_combined_counter (&lgm->counters, os_get_cpu_number (),
+ vlib_increment_combined_counter (&lgm->counters, vlib_get_thread_index (),
p[0], 1, bytes);
}