summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.c
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-02-05 17:27:57 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-08 10:01:09 +0000
commit1c6e5cf6905b2bd951982da9b712b13e2cb21295 (patch)
tree33e8624eb919a2e72e2ce8ea8bfe8e80906c17e8 /src/plugins/acl/acl.c
parentacbde664374303027e261ac096647592ca929f03 (diff)
acl-plugin: an elog-based tracing implementation for troubleshooting the conn cleaner threads interactions
This replaces some of the early-stage commented-out printf()s with an elog-based debug collector. It is aimed to be "better than nothing" initial implementation to be available in the field. It will be refined/updated based on use. This initial code is focused on the main/worker threads interactions, hence uses just the worker tracks. This code adds a developer debug CLI "set acl-plugin session table event-trace 1", which allows to gather the events pertaining to connection cleaning. The CLI is deliberately not part of the online help, as the express declaration that the semantics/trace levels, etc. are subject to change without notice. Change-Id: I3536309f737b73e50639cd5780822dcde667fc2c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.c')
-rw-r--r--src/plugins/acl/acl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index 8e1880a1d6b..1f1517c333d 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -2522,6 +2522,21 @@ acl_set_aclplugin_fn (vlib_main_t * vm,
goto done;
}
}
+ if (unformat (input, "event-trace"))
+ {
+ if (!unformat (input, "%u", &val))
+ {
+ error = clib_error_return (0,
+ "expecting trace level, got `%U`",
+ format_unformat_error, input);
+ goto done;
+ }
+ else
+ {
+ am->trace_sessions = val;
+ goto done;
+ }
+ }
goto done;
}
if (unformat (input, "timeout"))