aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/in2out_ed.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-09-26 01:08:00 -0700
committerOle Trøan <otroan@employees.org>2018-09-26 12:45:40 +0000
commit37a3a2a08f72310a3f7e898a9b44af7751f2cc9c (patch)
treec481e87b741ee5ddaa332830d135ad1c46f39c1a /src/plugins/nat/in2out_ed.c
parentcefe1341c6a536ebe161d97ab6fb10db95e57d05 (diff)
NAT44: endpoint-dependent mode session timeout improvement (VPP-1423)
Change-Id: Ib62e503f4eb5d72431288de32f417a4553df4e0c Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/in2out_ed.c')
-rw-r--r--src/plugins/nat/in2out_ed.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c
index 31977acf2a3..adf0ff30948 100644
--- a/src/plugins/nat/in2out_ed.c
+++ b/src/plugins/nat/in2out_ed.c
@@ -242,6 +242,8 @@ icmp_in2out_ed_slow_path (snat_main_t * sm, vlib_buffer_t * b0,
nat44_session_update_counters (s0, now,
vlib_buffer_length_in_chain
(sm->vlib_main, b0));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s0, thread_index);
}
return next0;
}
@@ -473,6 +475,8 @@ nat_not_translate_output_feature_fwd (snat_main_t * sm, ip4_header_t * ip,
/* Accounting */
nat44_session_update_counters (s, now,
vlib_buffer_length_in_chain (vm, b));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s, thread_index);
return 1;
}
else
@@ -815,6 +819,8 @@ nat44_ed_in2out_unknown_proto (snat_main_t * sm,
/* Accounting */
nat44_session_update_counters (s, now, vlib_buffer_length_in_chain (vm, b));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s, thread_index);
/* Hairpinning */
if (vnet_buffer (b)->sw_if_index[VLIB_TX] == ~0)
@@ -1075,6 +1081,8 @@ nat44_ed_in2out_node_fn_inline (vlib_main_t * vm,
nat44_session_update_counters (s0, now,
vlib_buffer_length_in_chain (vm,
b0));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s0, thread_index);
trace00:
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
@@ -1274,6 +1282,8 @@ nat44_ed_in2out_node_fn_inline (vlib_main_t * vm,
nat44_session_update_counters (s1, now,
vlib_buffer_length_in_chain (vm,
b1));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s1, thread_index);
trace01:
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
@@ -1502,6 +1512,8 @@ nat44_ed_in2out_node_fn_inline (vlib_main_t * vm,
nat44_session_update_counters (s0, now,
vlib_buffer_length_in_chain (vm,
b0));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s0, thread_index);
trace0:
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
@@ -1927,6 +1939,8 @@ nat44_ed_in2out_reass_node_fn_inline (vlib_main_t * vm,
nat44_session_update_counters (s0, now,
vlib_buffer_length_in_chain (vm,
b0));
+ /* Per-user LRU list maintenance */
+ nat44_session_update_lru (sm, s0, thread_index);
trace0:
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)