unsigned long zebra_debug_mpls;
unsigned long zebra_debug_vxlan;
unsigned long zebra_debug_pw;
+unsigned long zebra_debug_dplane;
+
+DEFINE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty));
DEFUN_NOSH (show_debugging_zebra,
show_debugging_zebra_cmd,
vty_out(vty, " Zebra VXLAN debugging is on\n");
if (IS_ZEBRA_DEBUG_PW)
vty_out(vty, " Zebra pseudowire debugging is on\n");
+ if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
+ 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");
+ hook_call(zebra_debug_show_debugging, vty);
return CMD_SUCCESS;
}
SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND)
- UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+ UNSET_FLAG(zebra_debug_kernel,
+ ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
} else if (argv_find(argv, argc, "send", &idx)) {
SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV)
- UNSET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
+ UNSET_FLAG(zebra_debug_kernel,
+ ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
} else {
SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
return CMD_SUCCESS;
}
+DEFUN (debug_zebra_dplane,
+ debug_zebra_dplane_cmd,
+ "debug zebra dplane [detailed]",
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug zebra dataplane events\n"
+ "Detailed debug information\n")
+{
+ int idx = 0;
+
+ SET_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE);
+
+ if (argv_find(argv, argc, "detailed", &idx))
+ SET_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE_DETAILED);
+
+ return CMD_SUCCESS;
+}
+
DEFUN (no_debug_zebra_events,
no_debug_zebra_events_cmd,
"no debug zebra events",
return CMD_SUCCESS;
}
+DEFUN (no_debug_zebra_dplane,
+ no_debug_zebra_dplane_cmd,
+ "no debug zebra dplane",
+ NO_STR
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug zebra dataplane events\n")
+{
+ zebra_debug_dplane = 0;
+ return CMD_SUCCESS;
+}
+
/* Debug node. */
struct cmd_node debug_node = {DEBUG_NODE, "", /* Debug node has no interface. */
1};
}
if (IS_ZEBRA_DEBUG_KERNEL) {
- if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND && IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV) {
+ if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
+ && IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV) {
vty_out(vty, "debug zebra kernel msgdump\n");
write++;
} else if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV) {
vty_out(vty, "debug zebra pseudowires\n");
write++;
}
+
+ if (CHECK_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE_DETAILED)) {
+ vty_out(vty, "debug zebra dplane detailed\n");
+ write++;
+ } else if (CHECK_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE)) {
+ vty_out(vty, "debug zebra dplane\n");
+ write++;
+ }
+
return write;
}
zebra_debug_mpls = 0;
zebra_debug_vxlan = 0;
zebra_debug_pw = 0;
+ zebra_debug_dplane = 0;
install_node(&debug_node, config_write_debug);
install_element(ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
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, &no_debug_zebra_events_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_kernel_msgdump_cmd);
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(CONFIG_NODE, &debug_zebra_events_cmd);
install_element(CONFIG_NODE, &debug_zebra_nht_cmd);
install_element(CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
install_element(CONFIG_NODE, &debug_zebra_rib_cmd);
install_element(CONFIG_NODE, &debug_zebra_fpm_cmd);
+ install_element(CONFIG_NODE, &debug_zebra_dplane_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_mpls_cmd);
install_element(CONFIG_NODE, &no_debug_zebra_kernel_msgdump_cmd);
install_element(CONFIG_NODE, &no_debug_zebra_rib_cmd);
install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd);
+ install_element(CONFIG_NODE, &no_debug_zebra_dplane_cmd);
}