Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
35ccd26
)
nat: print hash table parameters in CLI
83/27583/2
author
Klement Sekera
<ksekera@cisco.com>
Thu, 11 Jun 2020 14:00:52 +0000
(14:00 +0000)
committer
Dave Barach
<openvpp@barachs.net>
Wed, 17 Jun 2020 15:27:18 +0000
(15:27 +0000)
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Id6ab7e2ca965e860ea3f96145a888e0f3ccf9778
src/plugins/nat/nat44_cli.c
patch
|
blob
|
history
diff --git
a/src/plugins/nat/nat44_cli.c
b/src/plugins/nat/nat44_cli.c
index
18f51b1
..
c73cffa
100644
(file)
--- a/
src/plugins/nat/nat44_cli.c
+++ b/
src/plugins/nat/nat44_cli.c
@@
-209,7
+209,7
@@
done:
}
static clib_error_t *
}
static clib_error_t *
-nat44_show_hash_comm
na
d_fn (vlib_main_t * vm, unformat_input_t * input,
+nat44_show_hash_comm
an
d_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_command_t * cmd)
{
snat_main_t *sm = &snat_main;
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, "%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;
}
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]",
VLIB_CLI_COMMAND (nat44_show_hash, static) = {
.path = "show nat44 hash tables",
.short_help = "show nat44 hash tables [detail|verbose]",
- .function = nat44_show_hash_comm
na
d_fn,
+ .function = nat44_show_hash_comm
an
d_fn,
};
/*?
};
/*?