summaryrefslogtreecommitdiffstats
path: root/zebra/debug.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-01-11 22:16:09 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-01-31 15:20:46 +0100
commit236667251dbe0b78248185feb8dce6a5771801cd (patch)
tree8d4b73f22f5dabe84fef31753284b9d65a6b2a24 /zebra/debug.c
parentzebra: Add mlag information to zrouter (diff)
downloadfrr-236667251dbe0b78248185feb8dce6a5771801cd.tar.xz
frr-236667251dbe0b78248185feb8dce6a5771801cd.zip
zebra: Add code to allow us to add debug for mlag
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/debug.c')
-rw-r--r--zebra/debug.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index 0eb06d7f2..87999a1bb 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -23,6 +23,10 @@
#include "command.h"
#include "debug.h"
+#ifndef VTYSH_EXTRACT_PL
+#include "zebra/debug_clippy.c"
+#endif
+
/* For debug statement. */
unsigned long zebra_debug_event;
unsigned long zebra_debug_packet;
@@ -34,6 +38,7 @@ unsigned long zebra_debug_mpls;
unsigned long zebra_debug_vxlan;
unsigned long zebra_debug_pw;
unsigned long zebra_debug_dplane;
+unsigned long zebra_debug_mlag;
DEFINE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty));
@@ -94,6 +99,8 @@ DEFUN_NOSH (show_debugging_zebra,
vty_out(vty, " Zebra detailed dataplane debugging is on\n");
else if (IS_ZEBRA_DEBUG_DPLANE)
vty_out(vty, " Zebra dataplane debugging is on\n");
+ if (IS_ZEBRA_DEBUG_MLAG)
+ vty_out(vty, " Zebra mlag debugging is on\n");
hook_call(zebra_debug_show_debugging, vty);
return CMD_SUCCESS;
@@ -284,6 +291,21 @@ DEFUN (debug_zebra_dplane,
return CMD_SUCCESS;
}
+DEFPY (debug_zebra_mlag,
+ debug_zebra_mlag_cmd,
+ "[no$no] debug zebra mlag",
+ NO_STR
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug option set for mlag events\n")
+{
+ if (no)
+ UNSET_FLAG(zebra_debug_mlag, ZEBRA_DEBUG_MLAG);
+ else
+ SET_FLAG(zebra_debug_mlag, ZEBRA_DEBUG_MLAG);
+ return CMD_SUCCESS;
+}
+
DEFUN (no_debug_zebra_events,
no_debug_zebra_events_cmd,
"no debug zebra events",
@@ -507,6 +529,7 @@ void zebra_debug_init(void)
zebra_debug_vxlan = 0;
zebra_debug_pw = 0;
zebra_debug_dplane = 0;
+ zebra_debug_mlag = 0;
install_node(&debug_node, config_write_debug);
@@ -523,6 +546,7 @@ void zebra_debug_init(void)
install_element(ENABLE_NODE, &debug_zebra_rib_cmd);
install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
install_element(ENABLE_NODE, &debug_zebra_dplane_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_mlag_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_mpls_cmd);