avoid using thread local storage for thread index

It is cheaper to get thread index from vlib_main_t if available...

Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2018-07-11 12:47:43 +02:00
committed by Florin Coras
parent b6b04f0c2a
commit 067cd6229a
57 changed files with 99 additions and 98 deletions

View File

@@ -194,7 +194,7 @@ srv6_ad_localsid_fn (vlib_main_t * vm,
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
u32 thread_index = vlib_get_thread_index ();
u32 thread_index = vm->thread_index;
while (n_left_from > 0)
{