From 71bb05454c97cc18e3c95127b54385c52e4c57c2 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 16 Aug 2017 12:06:15 +0200 Subject: acl-plugin: time out the sessions created by main thread too (VPP-948) In multithread setup the main thread may send packets, which may pass through the node with permit+reflect action. This creates the connection in lists for thread0, however in multithread there are no interupt handlers there. Ensure we are not spending too much time spinning in a tight cycle by suspending the main cleaner thread until the current iteration of interrupts is processed. Change-Id: Idb7346737757ee9a67b5d3e549bc9ad9aab22e89 Signed-off-by: Andrew Yourtchenko (cherry picked from commit c1ff53f25d04ec1cc31844abd38014e91e398b5f) --- src/plugins/acl/acl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/acl/acl.c') diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c index 645c6c94..a2f85d9a 100644 --- a/src/plugins/acl/acl.c +++ b/src/plugins/acl/acl.c @@ -2242,6 +2242,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm, out0 = format(out0, " interrupt is pending: %d\n", pw->interrupt_is_pending); out0 = format(out0, " interrupt is needed: %d\n", pw->interrupt_is_needed); out0 = format(out0, " interrupt is unwanted: %d\n", pw->interrupt_is_unwanted); + out0 = format(out0, " interrupt generation: %d\n", pw->interrupt_generation); } out0 = format(out0, "\n\nConn cleaner thread counters:\n"); #define _(cnt, desc) out0 = format(out0, " %20lu: %s\n", am->cnt, desc); @@ -2249,6 +2250,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm, #undef _ vec_terminate_c_string(out0); vlib_cli_output(vm, "\n\n%s\n\n", out0); + vlib_cli_output(vm, "Interrupt generation: %d\n", am->fa_interrupt_generation); vlib_cli_output(vm, "Sessions per interval: min %lu max %lu increment: %f ms current: %f ms", am->fa_min_deleted_sessions_per_interval, am->fa_max_deleted_sessions_per_interval, am->fa_cleaner_wait_time_increment * 1000.0, ((f64)am->fa_current_cleaner_timer_wait_interval) * 1000.0/(f64)vm->clib_time.clocks_per_second); -- cgit 1.2.3-korg