summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2')
-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
4 files changed, 26 insertions, 6 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;
}
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);
/**