mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 07:15:19 +00:00
zebra: Add code to allow us to add debug for mlag
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
e96ba9daeb
commit
236667251d
@ -23,6 +23,10 @@
|
|||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
#ifndef VTYSH_EXTRACT_PL
|
||||||
|
#include "zebra/debug_clippy.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* For debug statement. */
|
/* For debug statement. */
|
||||||
unsigned long zebra_debug_event;
|
unsigned long zebra_debug_event;
|
||||||
unsigned long zebra_debug_packet;
|
unsigned long zebra_debug_packet;
|
||||||
@ -34,6 +38,7 @@ unsigned long zebra_debug_mpls;
|
|||||||
unsigned long zebra_debug_vxlan;
|
unsigned long zebra_debug_vxlan;
|
||||||
unsigned long zebra_debug_pw;
|
unsigned long zebra_debug_pw;
|
||||||
unsigned long zebra_debug_dplane;
|
unsigned long zebra_debug_dplane;
|
||||||
|
unsigned long zebra_debug_mlag;
|
||||||
|
|
||||||
DEFINE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty));
|
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");
|
vty_out(vty, " Zebra detailed dataplane debugging is on\n");
|
||||||
else if (IS_ZEBRA_DEBUG_DPLANE)
|
else if (IS_ZEBRA_DEBUG_DPLANE)
|
||||||
vty_out(vty, " Zebra dataplane debugging is on\n");
|
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);
|
hook_call(zebra_debug_show_debugging, vty);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -284,6 +291,21 @@ DEFUN (debug_zebra_dplane,
|
|||||||
return CMD_SUCCESS;
|
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,
|
DEFUN (no_debug_zebra_events,
|
||||||
no_debug_zebra_events_cmd,
|
no_debug_zebra_events_cmd,
|
||||||
"no debug zebra events",
|
"no debug zebra events",
|
||||||
@ -507,6 +529,7 @@ void zebra_debug_init(void)
|
|||||||
zebra_debug_vxlan = 0;
|
zebra_debug_vxlan = 0;
|
||||||
zebra_debug_pw = 0;
|
zebra_debug_pw = 0;
|
||||||
zebra_debug_dplane = 0;
|
zebra_debug_dplane = 0;
|
||||||
|
zebra_debug_mlag = 0;
|
||||||
|
|
||||||
install_node(&debug_node, config_write_debug);
|
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_rib_cmd);
|
||||||
install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
|
install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
|
||||||
install_element(ENABLE_NODE, &debug_zebra_dplane_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_events_cmd);
|
||||||
install_element(ENABLE_NODE, &no_debug_zebra_nht_cmd);
|
install_element(ENABLE_NODE, &no_debug_zebra_nht_cmd);
|
||||||
install_element(ENABLE_NODE, &no_debug_zebra_mpls_cmd);
|
install_element(ENABLE_NODE, &no_debug_zebra_mpls_cmd);
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
#define ZEBRA_DEBUG_DPLANE 0x01
|
#define ZEBRA_DEBUG_DPLANE 0x01
|
||||||
#define ZEBRA_DEBUG_DPLANE_DETAILED 0x02
|
#define ZEBRA_DEBUG_DPLANE_DETAILED 0x02
|
||||||
|
|
||||||
|
#define ZEBRA_DEBUG_MLAG 0x01
|
||||||
|
|
||||||
/* Debug related macro. */
|
/* Debug related macro. */
|
||||||
#define IS_ZEBRA_DEBUG_EVENT (zebra_debug_event & ZEBRA_DEBUG_EVENT)
|
#define IS_ZEBRA_DEBUG_EVENT (zebra_debug_event & ZEBRA_DEBUG_EVENT)
|
||||||
|
|
||||||
@ -79,6 +81,8 @@
|
|||||||
#define IS_ZEBRA_DEBUG_DPLANE_DETAIL \
|
#define IS_ZEBRA_DEBUG_DPLANE_DETAIL \
|
||||||
(zebra_debug_dplane & ZEBRA_DEBUG_DPLANE_DETAILED)
|
(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_event;
|
||||||
extern unsigned long zebra_debug_packet;
|
extern unsigned long zebra_debug_packet;
|
||||||
extern unsigned long zebra_debug_kernel;
|
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_vxlan;
|
||||||
extern unsigned long zebra_debug_pw;
|
extern unsigned long zebra_debug_pw;
|
||||||
extern unsigned long zebra_debug_dplane;
|
extern unsigned long zebra_debug_dplane;
|
||||||
|
extern unsigned long zebra_debug_mlag;
|
||||||
|
|
||||||
extern void zebra_debug_init(void);
|
extern void zebra_debug_init(void);
|
||||||
|
|
||||||
|
@ -95,6 +95,9 @@ zebra_zebra_SOURCES = \
|
|||||||
zebra/zebra_errors.c \
|
zebra/zebra_errors.c \
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
zebra/debug_clippy.c: $(CLIPPY_DEPS)
|
||||||
|
zebra/debug.$(OBJEXT): zebra/debug_clippy.c
|
||||||
|
|
||||||
zebra/zebra_mlag_clippy.c: $(CLIPPY_DEPS)
|
zebra/zebra_mlag_clippy.c: $(CLIPPY_DEPS)
|
||||||
zebra/zebra_mlag.$(OBJEXT): zebra/zebra_mlag_clippy.c
|
zebra/zebra_mlag.$(OBJEXT): zebra/zebra_mlag_clippy.c
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user