diff options
author | vivek <vivek@cumulusnetworks.com> | 2015-11-20 17:48:32 +0100 |
---|---|---|
committer | vivek <vivek@cumulusnetworks.com> | 2015-11-20 17:48:32 +0100 |
commit | 41ec92223a7dfc14eb8cb0b84c73ad09943213eb (patch) | |
tree | a533a74b37edb67130fa36ed96066f49933fa258 /zebra/debug.c | |
parent | Zebra: Fix replace route for uninstall scenario (diff) | |
download | frr-41ec92223a7dfc14eb8cb0b84c73ad09943213eb.tar.xz frr-41ec92223a7dfc14eb8cb0b84c73ad09943213eb.zip |
Zebra: Cleanup RIB debugs
Some of the changes include:
- ensuring IPv6 addresses are printed correctly
- say 'updating' or 'deleting' etc. only when that is actually done
- say 'queuing' or 'dequeuing' only when that is actually done
- print useful info for 'detailed' debug - that now subsumes 'rib queue'
- delete various useless logs
- VRF-specific - print VRF id in RIB debugs prior to prefix
(e.g., 4:37.1.1.0/28)
Ticket: CM-8110
Reviewed By: CCR-3765
Testing Done: Manual testing (2.5-br)
Diffstat (limited to 'zebra/debug.c')
-rw-r--r-- | zebra/debug.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index 10aba2d55..906d13d7e 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -68,10 +68,11 @@ DEFUN (show_debugging_zebra, if (IS_ZEBRA_DEBUG_KERNEL) vty_out (vty, " Zebra kernel debugging is on%s", VTY_NEWLINE); - if (IS_ZEBRA_DEBUG_RIB) + /* Check here using flags as the 'macro' does an OR */ + if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB)) vty_out (vty, " Zebra RIB debugging is on%s", VTY_NEWLINE); - if (IS_ZEBRA_DEBUG_RIB_Q) - vty_out (vty, " Zebra RIB queue debugging is on%s", VTY_NEWLINE); + if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED)) + vty_out (vty, " Zebra RIB detailed debugging is on%s", VTY_NEWLINE); if (IS_ZEBRA_DEBUG_FPM) vty_out (vty, " Zebra FPM debugging is on%s", VTY_NEWLINE); @@ -175,15 +176,15 @@ DEFUN (debug_zebra_rib, return CMD_SUCCESS; } -DEFUN (debug_zebra_rib_q, - debug_zebra_rib_q_cmd, - "debug zebra rib queue", +DEFUN (debug_zebra_rib_detailed, + debug_zebra_rib_detailed_cmd, + "debug zebra rib detailed", DEBUG_STR "Zebra configuration\n" "Debug RIB events\n" - "Debug RIB queueing\n") + "Detailed debugs\n") { - SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_Q); + SET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED); return CMD_SUCCESS; } @@ -275,16 +276,16 @@ DEFUN (no_debug_zebra_rib, return CMD_SUCCESS; } -DEFUN (no_debug_zebra_rib_q, - no_debug_zebra_rib_q_cmd, - "no debug zebra rib queue", +DEFUN (no_debug_zebra_rib_detailed, + no_debug_zebra_rib_detailed_cmd, + "no debug zebra rib detailed", NO_STR DEBUG_STR "Zebra configuration\n" "Debug zebra RIB\n" - "Debug RIB queueing\n") + "Detailed debugs\n") { - UNSET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_Q); + UNSET_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED); return CMD_SUCCESS; } @@ -345,14 +346,15 @@ config_write_debug (struct vty *vty) vty_out (vty, "debug zebra kernel%s", VTY_NEWLINE); write++; } - if (IS_ZEBRA_DEBUG_RIB) + /* Check here using flags as the 'macro' does an OR */ + if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB)) { vty_out (vty, "debug zebra rib%s", VTY_NEWLINE); write++; } - if (IS_ZEBRA_DEBUG_RIB_Q) + if (CHECK_FLAG (zebra_debug_rib, ZEBRA_DEBUG_RIB_DETAILED)) { - vty_out (vty, "debug zebra rib queue%s", VTY_NEWLINE); + vty_out (vty, "debug zebra rib detailed%s", VTY_NEWLINE); write++; } if (IS_ZEBRA_DEBUG_FPM) @@ -384,14 +386,14 @@ zebra_debug_init (void) install_element (ENABLE_NODE, &debug_zebra_packet_detail_cmd); install_element (ENABLE_NODE, &debug_zebra_kernel_cmd); install_element (ENABLE_NODE, &debug_zebra_rib_cmd); - install_element (ENABLE_NODE, &debug_zebra_rib_q_cmd); + install_element (ENABLE_NODE, &debug_zebra_rib_detailed_cmd); install_element (ENABLE_NODE, &debug_zebra_fpm_cmd); install_element (ENABLE_NODE, &no_debug_zebra_events_cmd); install_element (ENABLE_NODE, &no_debug_zebra_nht_cmd); install_element (ENABLE_NODE, &no_debug_zebra_packet_cmd); install_element (ENABLE_NODE, &no_debug_zebra_kernel_cmd); install_element (ENABLE_NODE, &no_debug_zebra_rib_cmd); - install_element (ENABLE_NODE, &no_debug_zebra_rib_q_cmd); + install_element (ENABLE_NODE, &no_debug_zebra_rib_detailed_cmd); install_element (ENABLE_NODE, &no_debug_zebra_fpm_cmd); install_element (CONFIG_NODE, &debug_zebra_events_cmd); @@ -401,13 +403,13 @@ zebra_debug_init (void) install_element (CONFIG_NODE, &debug_zebra_packet_detail_cmd); install_element (CONFIG_NODE, &debug_zebra_kernel_cmd); install_element (CONFIG_NODE, &debug_zebra_rib_cmd); - install_element (CONFIG_NODE, &debug_zebra_rib_q_cmd); + install_element (CONFIG_NODE, &debug_zebra_rib_detailed_cmd); install_element (CONFIG_NODE, &debug_zebra_fpm_cmd); install_element (CONFIG_NODE, &no_debug_zebra_events_cmd); install_element (CONFIG_NODE, &no_debug_zebra_nht_cmd); install_element (CONFIG_NODE, &no_debug_zebra_packet_cmd); install_element (CONFIG_NODE, &no_debug_zebra_kernel_cmd); install_element (CONFIG_NODE, &no_debug_zebra_rib_cmd); - install_element (CONFIG_NODE, &no_debug_zebra_rib_q_cmd); + install_element (CONFIG_NODE, &no_debug_zebra_rib_detailed_cmd); install_element (CONFIG_NODE, &no_debug_zebra_fpm_cmd); } |