aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/interface_cli.c5
-rw-r--r--src/vnet/l2/l2_input.c13
-rw-r--r--src/vnet/l2/l2_input.h2
-rw-r--r--src/vnet/l2/l2_output.c15
-rw-r--r--src/vnet/l2/l2_output.h2
5 files changed, 29 insertions, 8 deletions
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index b11d35e9efa..b15d283fe49 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -326,14 +326,15 @@ show_sw_interfaces (vlib_main_t * vm,
/* intf input features are masked by bridge domain */
if (l2_input->bridge)
fb &= l2input_bd_config (l2_input->bd_index)->feature_bitmap;
- vlib_cli_output (vm, "\nl2-input:\n%U", format_l2_input_features, fb);
+ vlib_cli_output (vm, "\nl2-input:\n%U", format_l2_input_features, fb,
+ 1);
l2_output_config_t *l2_output = l2output_intf_config (sw_if_index);
vlib_cli_output (vm, "\nl2-output:");
if (l2_output->out_vtr_flag)
vlib_cli_output (vm, "%10s (%s)", "VTR", "--internal--");
vlib_cli_output (vm, "%U", format_l2_output_features,
- l2_output->feature_bitmap);
+ l2_output->feature_bitmap, 1);
return 0;
}
if (show_tag)
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 85daba5a8ea..28b8697a7e4 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -71,6 +71,7 @@ format_l2_input_features (u8 * s, va_list * args)
#undef _
};
u32 feature_bitmap = va_arg (*args, u32);
+ u32 verbose = va_arg (*args, u32);
if (feature_bitmap == 0)
{
@@ -81,8 +82,16 @@ format_l2_input_features (u8 * s, va_list * args)
feature_bitmap &= ~L2INPUT_FEAT_DROP; /* Not a feature */
int i;
for (i = L2INPUT_N_FEAT; i >= 0; i--)
- if (feature_bitmap & (1 << i))
- s = format (s, "%17s (%s)\n", display_names[i], l2input_feat_names[i]);
+ {
+ if (feature_bitmap & (1 << i))
+ {
+ if (verbose)
+ s = format (s, "%17s (%s)\n",
+ display_names[i], l2input_feat_names[i]);
+ else
+ s = format (s, "%s ", l2input_feat_names[i]);
+ }
+ }
return s;
}
diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h
index 57fca57fc29..4a5cf6c8748 100644
--- a/src/vnet/l2/l2_input.h
+++ b/src/vnet/l2/l2_input.h
@@ -152,7 +152,7 @@ STATIC_ASSERT ((u64) L2INPUT_VALID_MASK == (1ull << L2INPUT_N_FEAT) - 1, "");
/** Return an array of strings containing graph node names of each feature */
char **l2input_get_feat_names (void);
-/* arg0 - u32 feature_bitmap */
+/* arg0 - u32 feature_bitmap, arg1 - u32 verbose */
u8 *format_l2_input_features (u8 * s, va_list * args);
static_always_inline u8
diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c
index 31e3f067749..27b838f4378 100644
--- a/src/vnet/l2/l2_output.c
+++ b/src/vnet/l2/l2_output.c
@@ -50,6 +50,7 @@ format_l2_output_features (u8 * s, va_list * args)
#undef _
};
u32 feature_bitmap = va_arg (*args, u32);
+ u32 verbose = va_arg (*args, u32);
if (feature_bitmap == 0)
{
@@ -59,8 +60,18 @@ format_l2_output_features (u8 * s, va_list * args)
int i;
for (i = L2OUTPUT_N_FEAT - 1; i >= 0; i--)
- if (feature_bitmap & (1 << i))
- s = format (s, "%17s (%s)\n", display_names[i], l2output_feat_names[i]);
+ {
+ if (feature_bitmap & (1 << i))
+ {
+ if (verbose)
+ s =
+ format (s, "%17s (%s)\n", display_names[i],
+ l2output_feat_names[i]);
+ else
+ s = format (s, "%s ", l2output_feat_names[i]);
+ }
+ }
+
return s;
}
diff --git a/src/vnet/l2/l2_output.h b/src/vnet/l2/l2_output.h
index 33eeb8e6e9b..74d2829839f 100644
--- a/src/vnet/l2/l2_output.h
+++ b/src/vnet/l2/l2_output.h
@@ -141,7 +141,7 @@ typedef enum
/* Return an array of strings containing graph node names of each feature */
char **l2output_get_feat_names (void);
-/* arg0 - u32 feature_bitmap */
+/* arg0 - u32 feature_bitmap, arg1 - u32 verbose */
u8 *format_l2_output_features (u8 * s, va_list * args);
/**