aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_input.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-11-09 08:19:27 -0800
committerOle Trøan <otroan@employees.org>2018-11-13 14:45:26 +0000
commit5d9df1db07969fea8f391bd48ba14cceb840da1e (patch)
tree5b78ed089e3a84ab1cc66ef968120f46348c69c8 /src/vnet/l2/l2_input.c
parenta3d5986a35743a3ca1020155bed8267b5246d155 (diff)
L2 feautre bitmaps output verbose/non-verbose mode
Change-Id: I15ff191ee8724a3354c074db590472db05e0652e Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_input.c')
-rw-r--r--src/vnet/l2/l2_input.c13
1 files changed, 11 insertions, 2 deletions
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;
}