summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/avf/output.c2
-rw-r--r--src/plugins/lb/node.c2
-rw-r--r--src/plugins/map/ip4_map.c4
-rw-r--r--src/plugins/map/ip4_map_t.c4
-rw-r--r--src/plugins/map/ip6_map.c6
-rw-r--r--src/plugins/map/ip6_map_t.c4
-rw-r--r--src/plugins/marvell/pp2/input.c2
-rw-r--r--src/plugins/marvell/pp2/output.c2
-rw-r--r--src/plugins/memif/device.c2
-rw-r--r--src/plugins/memif/node.c4
-rw-r--r--src/plugins/nat/dslite_in2out.c2
-rw-r--r--src/plugins/nat/dslite_out2in.c2
-rwxr-xr-xsrc/plugins/nat/in2out.c10
-rw-r--r--src/plugins/nat/nat64.c4
-rw-r--r--src/plugins/nat/nat64_in2out.c6
-rw-r--r--src/plugins/nat/nat64_out2in.c6
-rw-r--r--src/plugins/nat/nat66_in2out.c2
-rw-r--r--src/plugins/nat/nat66_out2in.c2
-rwxr-xr-xsrc/plugins/nat/out2in.c10
-rw-r--r--src/plugins/srv6-ad/node.c2
-rw-r--r--src/plugins/srv6-am/node.c2
21 files changed, 40 insertions, 40 deletions
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c
index 2722c99f31c..4eec79bd7a7 100644
--- a/src/plugins/avf/output.c
+++ b/src/plugins/avf/output.c
@@ -42,7 +42,7 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
avf_main_t *am = &avf_main;
vnet_interface_output_runtime_t *rd = (void *) node->runtime_data;
avf_device_t *ad = pool_elt_at_index (am->devices, rd->dev_instance);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u8 qid = thread_index;
avf_txq_t *txq = vec_elt_at_index (ad->txqs, qid % ad->num_queue_pairs);
avf_tx_desc_t *d0, *d1, *d2, *d3;
diff --git a/src/plugins/lb/node.c b/src/plugins/lb/node.c
index 44c7781e977..b33ea22b5c1 100644
--- a/src/plugins/lb/node.c
+++ b/src/plugins/lb/node.c
@@ -220,7 +220,7 @@ lb_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame,
{
lb_main_t *lbm = &lb_main;
u32 n_left_from, *from, next_index, *to_next, n_left_to_next;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 lb_time = lb_hash_time_now (vm);
lb_hash_t *sticky_ht = lb_get_sticky_table (thread_index);
diff --git a/src/plugins/map/ip4_map.c b/src/plugins/map/ip4_map.c
index 1bb33b016fa..715cdef3aae 100644
--- a/src/plugins/map/ip4_map.c
+++ b/src/plugins/map/ip4_map.c
@@ -203,7 +203,7 @@ ip4_map (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
next_index = node->cached_next_index;
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = mm->domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
while (n_left_from > 0)
{
@@ -519,7 +519,7 @@ ip4_map_reass (vlib_main_t * vm,
next_index = node->cached_next_index;
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = mm->domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 *fragments_to_drop = NULL;
u32 *fragments_to_loopback = NULL;
diff --git a/src/plugins/map/ip4_map_t.c b/src/plugins/map/ip4_map_t.c
index ab4b46c916f..0a9903a7ac4 100644
--- a/src/plugins/map/ip4_map_t.c
+++ b/src/plugins/map/ip4_map_t.c
@@ -177,7 +177,7 @@ ip4_map_t_icmp (vlib_main_t * vm,
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
vlib_combined_counter_main_t *cm = map_main.domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
while (n_left_from > 0)
{
@@ -541,7 +541,7 @@ ip4_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
next_index = node->cached_next_index;
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = map_main.domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
while (n_left_from > 0)
{
diff --git a/src/plugins/map/ip6_map.c b/src/plugins/map/ip6_map.c
index 5cdd9d94582..01b2d87f5dc 100644
--- a/src/plugins/map/ip6_map.c
+++ b/src/plugins/map/ip6_map.c
@@ -174,7 +174,7 @@ ip6_map (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
vlib_node_get_runtime (vm, ip6_map_node.index);
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = mm->domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -825,7 +825,7 @@ ip6_map_ip4_reass (vlib_main_t * vm,
vlib_node_get_runtime (vm, ip6_map_ip4_reass_node.index);
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = mm->domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 *fragments_to_drop = NULL;
u32 *fragments_to_loopback = NULL;
@@ -1018,7 +1018,7 @@ ip6_map_icmp_relay (vlib_main_t * vm,
vlib_node_runtime_t *error_node =
vlib_node_get_runtime (vm, ip6_map_icmp_relay_node.index);
map_main_t *mm = &map_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u16 *fragment_ids, *fid;
from = vlib_frame_vector_args (frame);
diff --git a/src/plugins/map/ip6_map_t.c b/src/plugins/map/ip6_map_t.c
index 852b1274bc0..01ed810bb9f 100644
--- a/src/plugins/map/ip6_map_t.c
+++ b/src/plugins/map/ip6_map_t.c
@@ -204,7 +204,7 @@ ip6_map_t_icmp (vlib_main_t * vm,
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
vlib_combined_counter_main_t *cm = map_main.domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
while (n_left_from > 0)
{
@@ -637,7 +637,7 @@ ip6_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
vlib_node_get_runtime (vm, ip6_map_t_node.index);
map_main_t *mm = &map_main;
vlib_combined_counter_main_t *cm = map_main.domain_counters;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
diff --git a/src/plugins/marvell/pp2/input.c b/src/plugins/marvell/pp2/input.c
index 6329e3b2220..72c1fe02f28 100644
--- a/src/plugins/marvell/pp2/input.c
+++ b/src/plugins/marvell/pp2/input.c
@@ -162,7 +162,7 @@ mrvl_pp2_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{
vnet_main_t *vnm = vnet_get_main ();
mrvl_pp2_main_t *ppm = &mrvl_pp2_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
mrvl_pp2_inq_t *inq = vec_elt_at_index (ppif->inqs, qid);
uword n_trace = vlib_get_trace_count (vm, node);
mrvl_pp2_per_thread_data_t *ptd =
diff --git a/src/plugins/marvell/pp2/output.c b/src/plugins/marvell/pp2/output.c
index 64529945f18..16efae5eecc 100644
--- a/src/plugins/marvell/pp2/output.c
+++ b/src/plugins/marvell/pp2/output.c
@@ -34,7 +34,7 @@ mrvl_pp2_interface_tx (vlib_main_t * vm,
mrvl_pp2_main_t *ppm = &mrvl_pp2_main;
vnet_interface_output_runtime_t *rd = (void *) node->runtime_data;
mrvl_pp2_if_t *ppif = pool_elt_at_index (ppm->interfaces, rd->dev_instance);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
mrvl_pp2_per_thread_data_t *ptd =
vec_elt_at_index (ppm->per_thread_data, thread_index);
u8 qid = thread_index;
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index 87c9404bd8e..5c8eb3f082c 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -409,7 +409,7 @@ CLIB_MULTIARCH_FN (memif_interface_tx) (vlib_main_t * vm,
vnet_interface_output_runtime_t *rund = (void *) node->runtime_data;
memif_if_t *mif = pool_elt_at_index (nm->interfaces, rund->dev_instance);
memif_queue_t *mq;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
memif_per_thread_data_t *ptd = vec_elt_at_index (memif_main.per_thread_data,
thread_index);
u8 tx_queues = vec_len (mif->tx_queues);
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index 6e2807a2054..2b8c4f2d228 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -187,7 +187,7 @@ memif_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left, *to_next = 0;
u32 bi0, bi1, bi2, bi3;
vlib_buffer_t *b0, *b1, *b2, *b3;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
memif_per_thread_data_t *ptd = vec_elt_at_index (mm->per_thread_data,
thread_index);
vlib_buffer_t *bt = &ptd->buffer_template;
@@ -542,7 +542,7 @@ memif_device_input_zc_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
u16 s0, s1, s2, s3;
memif_desc_t *d0, *d1, *d2, *d3;
vlib_buffer_t *b0, *b1, *b2, *b3;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
memif_per_thread_data_t *ptd = vec_elt_at_index (mm->per_thread_data,
thread_index);
u16 cur_slot, last_slot, ring_size, n_slots, mask, head;
diff --git a/src/plugins/nat/dslite_in2out.c b/src/plugins/nat/dslite_in2out.c
index ab0055cfee2..991d6eda775 100644
--- a/src/plugins/nat/dslite_in2out.c
+++ b/src/plugins/nat/dslite_in2out.c
@@ -228,7 +228,7 @@ dslite_in2out_node_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
dslite_in2out_next_t next_index;
u32 node_index;
vlib_node_runtime_t *error_node;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
f64 now = vlib_time_now (vm);
dslite_main_t *dm = &dslite_main;
diff --git a/src/plugins/nat/dslite_out2in.c b/src/plugins/nat/dslite_out2in.c
index 6bfc6e979cd..798367db6b1 100644
--- a/src/plugins/nat/dslite_out2in.c
+++ b/src/plugins/nat/dslite_out2in.c
@@ -101,7 +101,7 @@ dslite_out2in_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_from, *from, *to_next;
dslite_out2in_next_t next_index;
vlib_node_runtime_t *error_node;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
f64 now = vlib_time_now (vm);
dslite_main_t *dm = &dslite_main;
diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c
index ae9c836b773..be1ddb3db7e 100755
--- a/src/plugins/nat/in2out.c
+++ b/src/plugins/nat/in2out.c
@@ -1100,7 +1100,7 @@ snat_in2out_node_fn_inline (vlib_main_t * vm,
snat_main_t * sm = &snat_main;
f64 now = vlib_time_now (vm);
u32 stats_node_index;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
stats_node_index = is_slow_path ? snat_in2out_slowpath_node.index :
snat_in2out_node.index;
@@ -2066,7 +2066,7 @@ nat44_in2out_reass_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
snat_main_per_thread_data_t *per_thread_data =
&sm->per_thread_data[thread_index];
u32 *fragments_to_drop = 0;
@@ -2985,7 +2985,7 @@ nat44_ed_in2out_node_fn_inline (vlib_main_t * vm,
snat_in2out_next_t next_index;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
stats_node_index = is_slow_path ? nat44_ed_in2out_slowpath_node.index :
@@ -3793,7 +3793,7 @@ snat_det_in2out_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
u32 now = (u32) vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -4558,7 +4558,7 @@ snat_in2out_worker_handoff_fn_inline (vlib_main_t * vm,
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 fq_index;
u32 to_node_index;
vlib_frame_t *d = 0;
diff --git a/src/plugins/nat/nat64.c b/src/plugins/nat/nat64.c
index 53c2caba2fa..1ca5e369b98 100644
--- a/src/plugins/nat/nat64.c
+++ b/src/plugins/nat/nat64.c
@@ -573,7 +573,7 @@ nat64_static_bib_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
nat64_main_t *nm = &nat64_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
nat64_db_t *db = &nm->db[thread_index];
nat64_static_bib_to_update_t *static_bib;
nat64_db_bib_entry_t *bibe;
@@ -1155,7 +1155,7 @@ nat64_expire_worker_walk_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
nat64_main_t *nm = &nat64_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
nat64_db_t *db = &nm->db[thread_index];
u32 now = (u32) vlib_time_now (vm);
diff --git a/src/plugins/nat/nat64_in2out.c b/src/plugins/nat/nat64_in2out.c
index 6ff428bbb86..cdfe9b8d80c 100644
--- a/src/plugins/nat/nat64_in2out.c
+++ b/src/plugins/nat/nat64_in2out.c
@@ -922,7 +922,7 @@ nat64_in2out_node_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
nat64_in2out_next_t next_index;
u32 pkts_processed = 0;
u32 stats_node_index;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
stats_node_index =
is_slow_path ? nat64_in2out_slowpath_node.index : nat64_in2out_node.index;
@@ -1316,7 +1316,7 @@ nat64_in2out_reass_node_fn (vlib_main_t * vm,
u32 *fragments_to_drop = 0;
u32 *fragments_to_loopback = 0;
nat64_main_t *nm = &nat64_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -1644,7 +1644,7 @@ nat64_in2out_handoff_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 fq_index;
u32 to_node_index;
diff --git a/src/plugins/nat/nat64_out2in.c b/src/plugins/nat/nat64_out2in.c
index f43d3e081b4..f7d4dd417f5 100644
--- a/src/plugins/nat/nat64_out2in.c
+++ b/src/plugins/nat/nat64_out2in.c
@@ -408,7 +408,7 @@ nat64_out2in_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_from, *from, *to_next;
nat64_out2in_next_t next_index;
u32 pkts_processed = 0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -650,7 +650,7 @@ nat64_out2in_reass_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 *fragments_to_drop = 0;
u32 *fragments_to_loopback = 0;
nat64_main_t *nm = &nat64_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -930,7 +930,7 @@ nat64_out2in_handoff_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 fq_index;
u32 to_node_index;
diff --git a/src/plugins/nat/nat66_in2out.c b/src/plugins/nat/nat66_in2out.c
index d606bf46260..6bcf6ec667c 100644
--- a/src/plugins/nat/nat66_in2out.c
+++ b/src/plugins/nat/nat66_in2out.c
@@ -116,7 +116,7 @@ nat66_in2out_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_from, *from, *to_next;
nat66_in2out_next_t next_index;
u32 pkts_processed = 0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
nat66_main_t *nm = &nat66_main;
from = vlib_frame_vector_args (frame);
diff --git a/src/plugins/nat/nat66_out2in.c b/src/plugins/nat/nat66_out2in.c
index a28a4c3ade5..f264765448c 100644
--- a/src/plugins/nat/nat66_out2in.c
+++ b/src/plugins/nat/nat66_out2in.c
@@ -76,7 +76,7 @@ nat66_out2in_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 n_left_from, *from, *to_next;
nat66_out2in_next_t next_index;
u32 pkts_processed = 0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
nat66_main_t *nm = &nat66_main;
from = vlib_frame_vector_args (frame);
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index 1a1a1f1f639..ecfabc9c07a 100755
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -653,7 +653,7 @@ snat_out2in_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -1256,7 +1256,7 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm,
u32 pkts_processed = 0;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
snat_main_per_thread_data_t *per_thread_data =
&sm->per_thread_data[thread_index];
u32 *fragments_to_drop = 0;
@@ -2038,7 +2038,7 @@ nat44_ed_out2in_node_fn_inline (vlib_main_t * vm,
nat44_ed_out2in_next_t next_index;
snat_main_t *sm = &snat_main;
f64 now = vlib_time_now (vm);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
stats_node_index = is_slow_path ? nat44_ed_out2in_slowpath_node.index :
@@ -2837,7 +2837,7 @@ snat_det_out2in_node_fn (vlib_main_t * vm,
snat_out2in_next_t next_index;
u32 pkts_processed = 0;
snat_main_t * sm = &snat_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
from = vlib_frame_vector_args (frame);
n_left_from = frame->n_vectors;
@@ -3473,7 +3473,7 @@ snat_out2in_worker_handoff_fn (vlib_main_t * vm,
u32 n_left_to_next_worker = 0, *to_next_worker = 0;
u32 next_worker_index = 0;
u32 current_worker_index = ~0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
vlib_frame_t *d = 0;
ASSERT (vec_len (sm->workers));
diff --git a/src/plugins/srv6-ad/node.c b/src/plugins/srv6-ad/node.c
index e2111d65431..29851968108 100644
--- a/src/plugins/srv6-ad/node.c
+++ b/src/plugins/srv6-ad/node.c
@@ -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)
{
diff --git a/src/plugins/srv6-am/node.c b/src/plugins/srv6-am/node.c
index 8643aa42532..84014c5ee8d 100644
--- a/src/plugins/srv6-am/node.c
+++ b/src/plugins/srv6-am/node.c
@@ -148,7 +148,7 @@ srv6_am_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)
{