From a1018c166a468f7692ab621c743503914266f508 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 27 Mar 2020 11:54:53 +0100 Subject: nat: simplify bihash buckets/mem config Derive reasonable values from max translations/max users. Type: improvement Signed-off-by: Klement Sekera Change-Id: I41a96ab63ab138b4160cd60bd6df24fc73791c86 --- src/plugins/nat/in2out_ed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/nat/in2out_ed.c') diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c index 2e316f59c3a..49e3812441e 100644 --- a/src/plugins/nat/in2out_ed.c +++ b/src/plugins/nat/in2out_ed.c @@ -351,7 +351,8 @@ slow_path_ed (snat_main_t * sm, if (!nat_lru_free_one (sm, thread_index, now)) { b->error = node->errors[NAT_IN2OUT_ED_ERROR_MAX_SESSIONS_EXCEEDED]; - nat_ipfix_logging_max_sessions (thread_index, sm->max_translations); + nat_ipfix_logging_max_sessions (thread_index, + sm->max_translations_per_thread); nat_elog_notice ("maximum sessions exceeded"); return NAT_NEXT_DROP; } @@ -809,7 +810,8 @@ nat44_ed_in2out_unknown_proto (snat_main_t * sm, (sm, rx_fib_index, thread_index))) { b->error = node->errors[NAT_IN2OUT_ED_ERROR_MAX_SESSIONS_EXCEEDED]; - nat_ipfix_logging_max_sessions (thread_index, sm->max_translations); + nat_ipfix_logging_max_sessions (thread_index, + sm->max_translations_per_thread); nat_elog_notice ("maximum sessions exceeded"); return 0; } -- cgit 1.2.3-korg