summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-10-24 02:25:06 -0700
committerDave Barach <openvpp@barachs.net>2018-10-24 11:16:45 +0000
commit7d645f771cea143eab834e7f3383e36cef565786 (patch)
tree4277b4681a9e974c44415482f8bb6d6f2cec183e /src/vnet/l2/l2_fib.c
parenta1179589bea89b44f7b41001b5e5595a8793b1df (diff)
L2-fwd trace show the lookup result
Change-Id: I09cf6ee7b4874d71f293f8f1a426d3a5e9651749 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_fib.c')
-rw-r--r--src/vnet/l2/l2_fib.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index 46c041e72a0..48be42e8ce9 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -54,6 +54,27 @@
l2fib_main_t l2fib_main;
+u8 *
+format_l2fib_entry_result_flags (u8 * s, va_list * args)
+{
+ l2fib_entry_result_flags_t flags = va_arg (*args, int);
+
+ if (L2FIB_ENTRY_RESULT_FLAG_NONE == flags)
+ {
+ s = format (s, "none");
+ }
+ else
+ {
+#define _(a,v,t) { \
+ if (flags & L2FIB_ENTRY_RESULT_FLAG_##a) \
+ s = format (s, "%s ", t); \
+ }
+ foreach_l2fib_entry_result_attr
+#undef _
+ }
+ return (s);
+}
+
static void
incr_mac_address (u8 * mac)
{