summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-03-27 23:05:45 +0100
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-08-05 15:46:12 +0200
commit94eb163591a56f908128d02c9074d3548a647cca (patch)
tree246ba6c3c46db3162aadead4357d16ddc981c797 /zebra
parentbgpd: CLI changes for EAD routes and ES/ES-EVI display (diff)
downloadfrr-94eb163591a56f908128d02c9074d3548a647cca.tar.xz
frr-94eb163591a56f908128d02c9074d3548a647cca.zip
zebra: debug flags for evpn-mh ES and MAC-ECMP
Filters for MH debug logs Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/debug.c46
-rw-r--r--zebra/debug.h7
2 files changed, 53 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index c920fca5f..630614f5e 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -40,6 +40,7 @@ unsigned long zebra_debug_pw;
unsigned long zebra_debug_dplane;
unsigned long zebra_debug_mlag;
unsigned long zebra_debug_nexthop;
+unsigned long zebra_debug_evpn_mh;
DEFINE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty));
@@ -109,6 +110,12 @@ DEFUN_NOSH (show_debugging_zebra,
else if (IS_ZEBRA_DEBUG_NHG)
vty_out(vty, " Zebra nexthop debugging is on\n");
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
+ vty_out(vty, " Zebra EVPN-MH ethernet segment debugging is on\n");
+
+ if (IS_ZEBRA_DEBUG_EVPN_MH_NH)
+ vty_out(vty, " Zebra EVPN-MH nexthop debugging is on\n");
+
hook_call(zebra_debug_show_debugging, vty);
return CMD_SUCCESS;
}
@@ -320,6 +327,34 @@ DEFPY (debug_zebra_mlag,
return CMD_SUCCESS;
}
+DEFPY (debug_zebra_evpn_mh,
+ debug_zebra_evpn_mh_cmd,
+ "[no$no] debug zebra evpn mh <es$es|nh$nh>",
+ NO_STR
+ DEBUG_STR
+ "Zebra configuration\n"
+ "EVPN\n"
+ "Multihoming\n"
+ "Ethernet Segment Debugging\n"
+ "Nexthop Debugging\n")
+{
+ if (es) {
+ if (no)
+ UNSET_FLAG(zebra_debug_evpn_mh, ZEBRA_DEBUG_EVPN_MH_ES);
+ else
+ SET_FLAG(zebra_debug_evpn_mh, ZEBRA_DEBUG_EVPN_MH_ES);
+ }
+
+ if (nh) {
+ if (no)
+ UNSET_FLAG(zebra_debug_evpn_mh, ZEBRA_DEBUG_EVPN_MH_NH);
+ else
+ SET_FLAG(zebra_debug_evpn_mh, ZEBRA_DEBUG_EVPN_MH_NH);
+ }
+
+ return CMD_SUCCESS;
+}
+
DEFUN (no_debug_zebra_events,
no_debug_zebra_events_cmd,
"no debug zebra events",
@@ -553,6 +588,14 @@ static int config_write_debug(struct vty *vty)
vty_out(vty, "debug zebra mlag\n");
write++;
}
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES) {
+ vty_out(vty, "debug zebra evpn mh es\n");
+ write++;
+ }
+ if (IS_ZEBRA_DEBUG_EVPN_MH_NH) {
+ vty_out(vty, "debug zebra evpn mh nh\n");
+ write++;
+ }
if (IS_ZEBRA_DEBUG_PW) {
vty_out(vty, "debug zebra pseudowires\n");
write++;
@@ -589,6 +632,7 @@ void zebra_debug_init(void)
zebra_debug_pw = 0;
zebra_debug_dplane = 0;
zebra_debug_mlag = 0;
+ zebra_debug_evpn_mh = 0;
zebra_debug_nht = 0;
zebra_debug_nexthop = 0;
@@ -619,6 +663,7 @@ void zebra_debug_init(void)
install_element(ENABLE_NODE, &no_debug_zebra_rib_cmd);
install_element(ENABLE_NODE, &no_debug_zebra_fpm_cmd);
install_element(ENABLE_NODE, &no_debug_zebra_dplane_cmd);
+ install_element(ENABLE_NODE, &debug_zebra_evpn_mh_cmd);
install_element(CONFIG_NODE, &debug_zebra_events_cmd);
install_element(CONFIG_NODE, &debug_zebra_nht_cmd);
@@ -643,4 +688,5 @@ void zebra_debug_init(void)
install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd);
install_element(CONFIG_NODE, &no_debug_zebra_dplane_cmd);
install_element(CONFIG_NODE, &debug_zebra_mlag_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_evpn_mh_cmd);
}
diff --git a/zebra/debug.h b/zebra/debug.h
index e513f8865..ffd88d1d4 100644
--- a/zebra/debug.h
+++ b/zebra/debug.h
@@ -62,6 +62,9 @@ extern "C" {
#define ZEBRA_DEBUG_NHG 0x01
#define ZEBRA_DEBUG_NHG_DETAILED 0x02
+#define ZEBRA_DEBUG_EVPN_MH_ES 0x01
+#define ZEBRA_DEBUG_EVPN_MH_NH 0x02
+
/* Debug related macro. */
#define IS_ZEBRA_DEBUG_EVENT (zebra_debug_event & ZEBRA_DEBUG_EVENT)
@@ -100,6 +103,9 @@ extern "C" {
#define IS_ZEBRA_DEBUG_NHG_DETAIL \
(zebra_debug_nexthop & ZEBRA_DEBUG_NHG_DETAILED)
+#define IS_ZEBRA_DEBUG_EVPN_MH_ES (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_ES)
+#define IS_ZEBRA_DEBUG_EVPN_MH_NH (zebra_debug_evpn_mh & ZEBRA_DEBUG_EVPN_MH_NH)
+
extern unsigned long zebra_debug_event;
extern unsigned long zebra_debug_packet;
extern unsigned long zebra_debug_kernel;
@@ -112,6 +118,7 @@ extern unsigned long zebra_debug_pw;
extern unsigned long zebra_debug_dplane;
extern unsigned long zebra_debug_mlag;
extern unsigned long zebra_debug_nexthop;
+extern unsigned long zebra_debug_evpn_mh;
extern void zebra_debug_init(void);