diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-11 22:16:09 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-31 15:20:46 +0100 |
commit | 236667251dbe0b78248185feb8dce6a5771801cd (patch) | |
tree | 8d4b73f22f5dabe84fef31753284b9d65a6b2a24 /zebra | |
parent | zebra: Add mlag information to zrouter (diff) | |
download | frr-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')
-rw-r--r-- | zebra/debug.c | 24 | ||||
-rw-r--r-- | zebra/debug.h | 5 | ||||
-rw-r--r-- | zebra/subdir.am | 3 |
3 files changed, 32 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); diff --git a/zebra/debug.h b/zebra/debug.h index cd15441ec..c79cd96c2 100644 --- a/zebra/debug.h +++ b/zebra/debug.h @@ -51,6 +51,8 @@ #define ZEBRA_DEBUG_DPLANE 0x01 #define ZEBRA_DEBUG_DPLANE_DETAILED 0x02 +#define ZEBRA_DEBUG_MLAG 0x01 + /* Debug related macro. */ #define IS_ZEBRA_DEBUG_EVENT (zebra_debug_event & ZEBRA_DEBUG_EVENT) @@ -79,6 +81,8 @@ #define IS_ZEBRA_DEBUG_DPLANE_DETAIL \ (zebra_debug_dplane & ZEBRA_DEBUG_DPLANE_DETAILED) +#define IS_ZEBRA_DEBUG_MLAG (zebra_debug_mlag & ZEBRA_DEBUG_MLAG) + extern unsigned long zebra_debug_event; extern unsigned long zebra_debug_packet; extern unsigned long zebra_debug_kernel; @@ -89,6 +93,7 @@ extern unsigned long zebra_debug_mpls; extern unsigned long zebra_debug_vxlan; extern unsigned long zebra_debug_pw; extern unsigned long zebra_debug_dplane; +extern unsigned long zebra_debug_mlag; extern void zebra_debug_init(void); diff --git a/zebra/subdir.am b/zebra/subdir.am index daa7946bc..1e36d020a 100644 --- a/zebra/subdir.am +++ b/zebra/subdir.am @@ -95,6 +95,9 @@ zebra_zebra_SOURCES = \ zebra/zebra_errors.c \ # end +zebra/debug_clippy.c: $(CLIPPY_DEPS) +zebra/debug.$(OBJEXT): zebra/debug_clippy.c + zebra/zebra_mlag_clippy.c: $(CLIPPY_DEPS) zebra/zebra_mlag.$(OBJEXT): zebra/zebra_mlag_clippy.c |