}
#define foreach_nat66_in2out_error \
-_(IN2OUT_PACKETS, "good in2out packets processed") \
_(NO_TRANSLATION, "no translation") \
_(UNKNOWN, "unknown")
}
/* *INDENT-OFF* */
- pool_foreach (i, nm->interfaces,
- ({
+ pool_foreach (i, nm->interfaces)
+ {
/* NAT packet aimed at outside interface */
if (nat66_interface_is_outside (i) && sw_if_index == i->sw_if_index)
return 0;
- }));
+ }
/* *INDENT-ON* */
return 1;
{
u32 n_left_from, *from, *to_next;
nat66_in2out_next_t next_index;
- u32 pkts_processed = 0;
u32 thread_index = vm->thread_index;
nat66_main_t *nm = &nat66_main;
t->next_index = next0;
}
- pkts_processed += next0 != NAT66_IN2OUT_NEXT_DROP;
+ if (next0 != NAT66_IN2OUT_NEXT_DROP)
+ {
+ vlib_increment_simple_counter (&nm->in2out_packets,
+ thread_index, sw_if_index0, 1);
+ }
/* verify speculative enqueue, maybe switch current next frame */
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- vlib_node_increment_counter (vm, nm->in2out_node_index,
- NAT66_IN2OUT_ERROR_IN2OUT_PACKETS,
- pkts_processed);
return frame->n_vectors;
}