aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.c
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-09-14 11:21:58 +0200
committerOle Trøan <otroan@employees.org>2018-09-25 11:31:34 +0000
commit608f95cddc4e1e78b4d3ac3b2c3f1ae86f1fa632 (patch)
tree46acac1ad835a1400b377e2f99193e53f6d11278 /src/plugins/acl/acl.c
parenteacde3f123727fef65d87f2395e2de245d6efe67 (diff)
acl-plugin: optimize session idle timer checks
This commit adds explicit signaling from a non-owning thread to the owning thread to restart the session timer as necessary. Consequently, we now can sweep the session lists at their respective timeouts, rather than sweeping all the lists at the pace of the shortest timeout value, just taking care to wake up if the session requeue to a different list results in needing to wake up earlier. Change-Id: Ifc8c500f6988748f4cd3dc184dd7824321aaaaca Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.c')
-rw-r--r--src/plugins/acl/acl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index b6e491cf897..866c6ffc5f0 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -3900,6 +3900,10 @@ acl_plugin_show_sessions (acl_main_t * am,
pw->interrupt_is_unwanted);
vlib_cli_output (vm, " interrupt generation: %d",
pw->interrupt_generation);
+ vlib_cli_output (vm, " received session change requests: %d",
+ pw->rcvd_session_change_requests);
+ vlib_cli_output (vm, " sent session change requests: %d",
+ pw->sent_session_change_requests);
}
vlib_cli_output (vm, "\n\nConn cleaner thread counters:");
#define _(cnt, desc) vlib_cli_output(vm, " %20lu: %s", am->cnt, desc);
@@ -4212,6 +4216,10 @@ acl_init (vlib_main_t * vm)
for (wk = 0; wk < vec_len (am->per_worker_data); wk++)
{
acl_fa_per_worker_data_t *pw = &am->per_worker_data[wk];
+ if (tm->n_vlib_mains > 1)
+ {
+ clib_spinlock_init (&pw->pending_session_change_request_lock);
+ }
vec_validate (pw->expired,
ACL_N_TIMEOUTS *
am->fa_max_deleted_sessions_per_interval);