diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/adj/adj.c | 11 | ||||
-rw-r--r-- | src/vnet/adj/adj_internal.h | 15 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c index 8808294f7a6..1345522c591 100644 --- a/src/vnet/adj/adj.c +++ b/src/vnet/adj/adj.c @@ -34,6 +34,11 @@ vlib_combined_counter_main_t adjacency_counters = { ip_adjacency_t *adj_pool; /** + * The adjacency logger + */ +vlib_log_class_t adj_logger; + +/** * @brief Global Config for enabling per-adjacency counters. * By default these are disabled. */ @@ -350,7 +355,6 @@ adj_lock (adj_index_t adj_index) adj = adj_get(adj_index); ASSERT(adj); - ADJ_DBG(adj, "lock"); fib_node_lock(&adj->ia_node); } @@ -367,9 +371,6 @@ adj_unlock (adj_index_t adj_index) adj = adj_get(adj_index); ASSERT(adj); - ADJ_DBG(adj, "unlock"); - ASSERT(adj); - fib_node_unlock(&adj->ia_node); } @@ -650,6 +651,8 @@ adj_module_init (vlib_main_t * vm) vnet_feature_register(adj_feature_update, NULL); + adj_logger = vlib_log_register_class("adj", "adj"); + return (NULL); } diff --git a/src/vnet/adj/adj_internal.h b/src/vnet/adj/adj_internal.h index 6842bc4147e..380af46e22a 100644 --- a/src/vnet/adj/adj_internal.h +++ b/src/vnet/adj/adj_internal.h @@ -31,16 +31,13 @@ /* * Debug macro */ -#ifdef ADJ_DEBUG -#define ADJ_DBG(_adj, _fmt, _args...) \ -{ \ - clib_warning("adj:[%d:%p]:" _fmt, \ - _adj - adj_pool, _adj, \ - ##_args); \ +extern vlib_log_class_t adj_logger; +#define ADJ_DBG(_adj, _fmt, _args...) \ +{ \ + vlib_log_debug(adj_logger, "adj:[%d:%p]:" _fmt, \ + _adj - adj_pool, _adj, \ + ##_args); \ } -#else -#define ADJ_DBG(_e, _fmt, _args...) -#endif /* * Vlib nodes |