diff options
Diffstat (limited to 'src/plugins/srv6-ad/node.c')
-rw-r--r-- | src/plugins/srv6-ad/node.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/plugins/srv6-ad/node.c b/src/plugins/srv6-ad/node.c index 29851968108..e6afe42650a 100644 --- a/src/plugins/srv6-ad/node.c +++ b/src/plugins/srv6-ad/node.c @@ -194,8 +194,6 @@ srv6_ad_localsid_fn (vlib_main_t * vm, n_left_from = frame->n_vectors; next_index = node->cached_next_index; - u32 thread_index = vm->thread_index; - while (n_left_from > 0) { u32 n_left_to_next; @@ -243,9 +241,10 @@ srv6_ad_localsid_fn (vlib_main_t * vm, SRV6_AD_LOCALSID_NEXT_ERROR) ? &(sm->sr_ls_invalid_counters) : &(sm->sr_ls_valid_counters)), - thread_index, ls0 - sm->localsids, - 1, vlib_buffer_length_in_chain (vm, - b0)); + vm->thread_index, + ls0 - sm->localsids, 1, + vlib_buffer_length_in_chain (vm, + b0)); vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); @@ -377,6 +376,15 @@ srv6_ad4_rewrite_fn (vlib_main_t * vm, } } + /* Increment per-SID AD rewrite counters */ + vlib_increment_combined_counter (((next0 == + SRV6_AD_LOCALSID_NEXT_ERROR) ? + &(sm->invalid_counters) : + &(sm->valid_counters)), + vm->thread_index, ls0_mem->index, + 1, vlib_buffer_length_in_chain (vm, + b0)); + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); @@ -506,6 +514,15 @@ srv6_ad6_rewrite_fn (vlib_main_t * vm, } } + /* Increment per-SID AD rewrite counters */ + vlib_increment_combined_counter (((next0 == + SRV6_AD_LOCALSID_NEXT_ERROR) ? + &(sm->invalid_counters) : + &(sm->valid_counters)), + vm->thread_index, ls0_mem->index, + 1, vlib_buffer_length_in_chain (vm, + b0)); + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); |