aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/dataplane_node.c
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-05-30 22:29:29 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-06-02 06:01:42 +0000
commit4bc1796b346efd10f3fb19b176ff089179263a24 (patch)
treea469e104bd24039fe5f804556446216b9f1ac9e0 /src/plugins/acl/dataplane_node.c
parentb2371c25fed6b2e751163df590bb9d9a93a75a0f (diff)
acl-plugin: multicore: session management fixes
- implement a 1us purgatory for the session structures by adding a special connection list, where all connections about to be deleted go. - add per-list-head timeouts updated upon the list enqueue/dequeue for connection idle management - add a "unused" session list with list ID#0, which should never be used unless there is a logic error. Use this ID to initialize the sessions. - improve the maintainability of the session linked list structures by using symbolic bogus index name instead of ~0 - change the ordering of session creations - first reverse, then local. To minimize the potential for two workers competing for the same session in the corner case of the two packets on different workers creating the same logical session - reduce the maximum session count to keep the memory usage the same - add extra log/debug/trace to session cleaning logic - be more aggressive with cleaning up sessions - wind up the interrupts from the workers to themselves if there is more work to do Change-Id: I3aa1c91a925a08e83793467cb15bda178c21e426 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/dataplane_node.c')
-rw-r--r--src/plugins/acl/dataplane_node.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/acl/dataplane_node.c b/src/plugins/acl/dataplane_node.c
index 351cbbd8fb2..f1ed4c28b99 100644
--- a/src/plugins/acl/dataplane_node.c
+++ b/src/plugins/acl/dataplane_node.c
@@ -153,7 +153,8 @@ acl_fa_node_fn (vlib_main_t * vm,
if (acl_fa_ifc_has_sessions (am, sw_if_index0))
{
- if (acl_fa_find_session (am, sw_if_index0, &fa_5tuple, &value_sess))
+ if (acl_fa_find_session (am, sw_if_index0, &fa_5tuple, &value_sess)
+ && (value_sess.value != ~0ULL))
{
trace_bitmap |= 0x80000000;
error0 = ACL_FA_ERROR_ACL_EXIST_SESSION;
@@ -215,10 +216,12 @@ acl_fa_node_fn (vlib_main_t * vm,
sw_if_index0);
vec_elt (pw->fa_session_epoch_change_by_sw_if_index,
sw_if_index0)++;
- if (acl_fa_conn_list_delete_session (am, f_sess_id))
+ if (acl_fa_conn_list_delete_session
+ (am, f_sess_id, now))
{
/* delete the session only if we were able to unlink it */
- acl_fa_delete_session (am, sw_if_index0, f_sess_id);
+ acl_fa_two_stage_delete_session (am, sw_if_index0,
+ f_sess_id, now);
}
acl_check_needed = 1;
trace_bitmap |= 0x40000000;
@@ -243,7 +246,7 @@ acl_fa_node_fn (vlib_main_t * vm,
{
if (!acl_fa_can_add_session (am, is_input, sw_if_index0))
acl_fa_try_recycle_session (am, is_input, thread_index,
- sw_if_index0);
+ sw_if_index0, now);
if (acl_fa_can_add_session (am, is_input, sw_if_index0))
{