summaryrefslogtreecommitdiffstats
path: root/src/vnet/classify/vnet_classify.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2021-09-01 09:02:13 -0400
committerFlorin Coras <florin.coras@gmail.com>2021-09-01 13:56:24 +0000
commiteb2e1f9d33d89c99385aa9e9ba9b85c33c42a12c (patch)
treeb2c2952ab155600ab19a389f16bddd17d4ab6f75 /src/vnet/classify/vnet_classify.c
parent4c45d6fef426863cce7a6f6cb42150897a674ed9 (diff)
classify: improve "show classify table" output
Print header for each table. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I54ca04d6000a98afb4ad3d2f24caae3349548f23
Diffstat (limited to 'src/vnet/classify/vnet_classify.c')
-rw-r--r--src/vnet/classify/vnet_classify.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c
index ab933eb816b..48d444271c5 100644
--- a/src/vnet/classify/vnet_classify.c
+++ b/src/vnet/classify/vnet_classify.c
@@ -2213,7 +2213,7 @@ format_vnet_classify_table (u8 *s, va_list *args)
if (index == ~0)
{
- s = format (s, "%10s%10s%10s%10s", "TableIdx", "Sessions", "NextTbl",
+ s = format (s, "\n%10s%10s%10s%10s", "TableIdx", "Sessions", "NextTbl",
"NextNode", verbose ? "Details" : "");
return s;
}
@@ -2274,11 +2274,13 @@ show_classify_tables_command_fn (vlib_main_t * vm,
if (vec_len (indices))
{
- vlib_cli_output (vm, "%U", format_vnet_classify_table, cm, verbose,
- ~0 /* hdr */ );
for (i = 0; i < vec_len (indices); i++)
- vlib_cli_output (vm, "%U", format_vnet_classify_table, cm,
- verbose, indices[i]);
+ {
+ vlib_cli_output (vm, "%U", format_vnet_classify_table, cm, verbose,
+ ~0 /* hdr */);
+ vlib_cli_output (vm, "%U", format_vnet_classify_table, cm, verbose,
+ indices[i]);
+ }
}
else
vlib_cli_output (vm, "No classifier tables configured");