summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-06-11 14:00:52 +0000
committerDave Barach <openvpp@barachs.net>2020-06-17 15:27:18 +0000
commitf6a9b1442a1d8d267aaf68465a78e09046d9b576 (patch)
tree6760ef6bb4adc9f809d5efb29a64490c58997c25 /src/plugins/nat
parent35ccd26a5d509a090d7f173de4145c1c402c4f61 (diff)
nat: print hash table parameters in CLI
Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Id6ab7e2ca965e860ea3f96145a888e0f3ccf9778
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat44_cli.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c
index 18f51b1a6e1..c73cffa85b2 100644
--- a/src/plugins/nat/nat44_cli.c
+++ b/src/plugins/nat/nat44_cli.c
@@ -209,7 +209,7 @@ done:
}
static clib_error_t *
-nat44_show_hash_commnad_fn (vlib_main_t * vm, unformat_input_t * input,
+nat44_show_hash_command_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_command_t * cmd)
{
snat_main_t *sm = &snat_main;
@@ -252,6 +252,17 @@ nat44_show_hash_commnad_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_output (vm, "%U", format_bihash_16_8, &nam->affinity_hash,
verbose);
}
+
+ vlib_cli_output (vm, "-------- hash table parameters --------\n");
+ vlib_cli_output (vm, "translation buckets: %u", sm->translation_buckets);
+ vlib_cli_output (vm, "translation memory size: %U",
+ format_memory_size, sm->translation_memory_size);
+ if (!sm->endpoint_dependent)
+ {
+ vlib_cli_output (vm, "user buckets: %u", sm->user_buckets);
+ vlib_cli_output (vm, "user memory size: %U",
+ format_memory_size, sm->user_memory_size);
+ }
return 0;
}
@@ -2448,7 +2459,7 @@ VLIB_CLI_COMMAND (nat_ha_resync_command, static) = {
VLIB_CLI_COMMAND (nat44_show_hash, static) = {
.path = "show nat44 hash tables",
.short_help = "show nat44 hash tables [detail|verbose]",
- .function = nat44_show_hash_commnad_fn,
+ .function = nat44_show_hash_command_fn,
};
/*?