vppinfra: simpler and faster pool_foreach

- reduces number of instructions generated 4 times compared to old code
 - adds pool_foreach2 which is more friendly to clang-format

Type: improvement

Change-Id: I51e9c7fb09655c60d883987dadf5b2666c12b3f7
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2020-12-12 23:32:12 +01:00
committed by Dave Barach
parent dc01471be7
commit 62c25abaa3
3 changed files with 33 additions and 16 deletions

View File

@@ -750,7 +750,7 @@ nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
u32 count = 0;
u64 now = vlib_time_now (vm);
u64 sess_timeout_time;
u64 sess_timeout_time = 0;
u32 udp_sessions = 0;
u32 tcp_sessions = 0;