summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-09-24 12:36:26 +0000
committerDamjan Marion <dmarion@me.com>2018-10-16 12:22:49 +0000
commit710071bf0ed7a0926581d1f738a142b72e795d2b (patch)
tree6e3b8e7bc07b3e48ed4041ffe657ba1e4da058f1 /src/vnet/fib/fib_entry_src.h
parenta5ab5034f4b50fc5a19ccf8910c91613e6a52f5a (diff)
FIB: use vlib-log for debugging
Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry_src.h')
-rw-r--r--src/vnet/fib/fib_entry_src.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/vnet/fib/fib_entry_src.h b/src/vnet/fib/fib_entry_src.h
index 61740201eb7..1d5f252eb87 100644
--- a/src/vnet/fib/fib_entry_src.h
+++ b/src/vnet/fib/fib_entry_src.h
@@ -23,24 +23,21 @@
/**
* Debug macro
*/
-#ifdef FIB_DEBUG
+extern vlib_log_class_t fib_entry_logger;
+
#define FIB_ENTRY_DBG(_e, _fmt, _args...) \
{ \
- u8*__tmp = NULL; \
- __tmp = format(__tmp, "e:[%d:%U", \
- fib_entry_get_index(_e), \
- format_ip46_address, \
- &_e->fe_prefix.fp_addr, \
- IP46_TYPE_ANY); \
- __tmp = format(__tmp, "/%d]:", \
- _e->fe_prefix.fp_len); \
- __tmp = format(__tmp, _fmt, ##_args); \
- clib_warning("%s", __tmp); \
- vec_free(__tmp); \
+ vlib_log_debug(fib_entry_logger, \
+ "[@%d:[%U]:%U:%U]: " _fmt, \
+ fib_entry_get_index(_e), \
+ format_fib_prefix, \
+ &_e->fe_prefix, \
+ format_fib_entry_flags, \
+ _e->fe_srcs[0].fes_entry_flags, \
+ format_fib_source, \
+ _e->fe_srcs[0].fes_src, \
+ ##_args); \
}
-#else
-#define FIB_ENTRY_DBG(_e, _fmt, _args...)
-#endif
/**
* Source initialisation Function