summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-12-03 15:27:40 +0100
committerOle Tr�an <otroan@employees.org>2020-12-16 08:14:27 +0000
commit18f1e41d9c64188043f2b3fb1473d73242264a60 (patch)
treed9f9cbcda544c80397fbeb2e3727e2843c1969f1 /src/plugins/nat/nat.c
parent6cbb111086a9fd74330d95511bc551128e1539ef (diff)
nat: refactor & MW support for NAT tests
Split ED and EI nat44 test cases. Added multi worker support for ED test cases. Type: refactor Change-Id: Ibcc2f62b94cacff69ed35c5d914b55f9fdbcf882 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rw-r--r--src/plugins/nat/nat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index e02a11a604f..eeaa443bfe4 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -4388,16 +4388,13 @@ nat44_sessions_clear ()
/* *INDENT-OFF* */
vec_foreach (tsm, sm->per_thread_data)
{
- u32 ti;
-
nat44_db_free (tsm);
nat44_db_init (tsm);
-
- ti = tsm->snat_thread_index;
- vlib_set_simple_counter (&sm->total_users, ti, 0, 0);
- vlib_set_simple_counter (&sm->total_sessions, ti, 0, 0);
}
/* *INDENT-ON* */
+
+ vlib_zero_simple_counter (&sm->total_users, 0);
+ vlib_zero_simple_counter (&sm->total_sessions, 0);
}
static void