summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.h
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-03-27 11:54:53 +0100
committerOle Trøan <otroan@employees.org>2020-06-11 08:02:16 +0000
commita1018c166a468f7692ab621c743503914266f508 (patch)
tree5bf1545971dcbad0ffa3f47bad160baf63b2e0d3 /src/plugins/nat/nat.h
parent35418ba491505318e0b08b372fcf1e9f0d45d80f (diff)
nat: simplify bihash buckets/mem config
Derive reasonable values from max translations/max users. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I41a96ab63ab138b4160cd60bd6df24fc73791c86
Diffstat (limited to 'src/plugins/nat/nat.h')
-rw-r--r--src/plugins/nat/nat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h
index 8b04e18b18b..d5b236dac01 100644
--- a/src/plugins/nat/nat.h
+++ b/src/plugins/nat/nat.h
@@ -635,9 +635,9 @@ typedef struct snat_main_s
u32 translation_buckets;
uword translation_memory_size;
- u32 max_translations;
+ u32 max_translations_per_thread;
u32 *max_translations_per_fib;
-
+ u32 max_users_per_thread;
u32 user_buckets;
uword user_memory_size;
u32 max_translations_per_user;
@@ -660,6 +660,7 @@ typedef struct snat_main_s
/* counters/gauges */
vlib_simple_counter_main_t total_users;
vlib_simple_counter_main_t total_sessions;
+ vlib_simple_counter_main_t user_limit_reached;;
/* API message ID base */
u16 msg_id_base;