summaryrefslogtreecommitdiffstats
path: root/src/plugins/srv6-un
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/srv6-un')
-rw-r--r--src/plugins/srv6-un/node.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/plugins/srv6-un/node.c b/src/plugins/srv6-un/node.c
index caca18c56f2..9368f2083ef 100644
--- a/src/plugins/srv6-un/node.c
+++ b/src/plugins/srv6-un/node.c
@@ -187,34 +187,22 @@ srv6_un_localsid_fn (vlib_main_t * vm,
}
vlib_increment_combined_counter
- (((next0 ==
- SRV6_UN_LOCALSID_NEXT_ERROR) ?
- &(sm->sr_ls_invalid_counters) :
- &(sm->sr_ls_valid_counters)),
+ (&(sm->sr_ls_valid_counters),
thread_index, ls0 - sm->localsids,
1, vlib_buffer_length_in_chain (vm, b0));
vlib_increment_combined_counter
- (((next1 ==
- SRV6_UN_LOCALSID_NEXT_ERROR) ?
- &(sm->sr_ls_invalid_counters) :
- &(sm->sr_ls_valid_counters)),
+ (&(sm->sr_ls_valid_counters),
thread_index, ls1 - sm->localsids,
1, vlib_buffer_length_in_chain (vm, b1));
vlib_increment_combined_counter
- (((next2 ==
- SRV6_UN_LOCALSID_NEXT_ERROR) ?
- &(sm->sr_ls_invalid_counters) :
- &(sm->sr_ls_valid_counters)),
+ (&(sm->sr_ls_valid_counters),
thread_index, ls2 - sm->localsids,
1, vlib_buffer_length_in_chain (vm, b2));
vlib_increment_combined_counter
- (((next3 ==
- SRV6_UN_LOCALSID_NEXT_ERROR) ?
- &(sm->sr_ls_invalid_counters) :
- &(sm->sr_ls_valid_counters)),
+ (&(sm->sr_ls_valid_counters),
thread_index, ls3 - sm->localsids,
1, vlib_buffer_length_in_chain (vm, b3));
@@ -261,13 +249,10 @@ srv6_un_localsid_fn (vlib_main_t * vm,
}
/* This increments the SRv6 per LocalSID counters. */
- vlib_increment_combined_counter (((next0 ==
- SRV6_UN_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));
+ vlib_increment_combined_counter
+ (&(sm->sr_ls_valid_counters),
+ 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);