summaryrefslogtreecommitdiff
path: root/zebra/debug.c
diff options
context:
space:
mode:
authorßingen <bingen@voltanet.io>2017-05-15 17:09:28 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-07-25 00:53:23 -0300
commit6da80de983d313b6343e5a3e0a3b6a2bffbffbef (patch)
treec6bef66af54194caf7a88544a696f3b3e605bc02 /zebra/debug.c
parentb557e0b6df1d076b51de7d357746388a5c969803 (diff)
zebra: add pseudowire manager
Base framework for supporting MPLS pseudowires in FRR. A consistent zserv interface is provided so that any client daemon (e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard way. Static pseudowires can also be implemented by using the same interface. When zebra receives a request to install a pseudowire and the installation in the kernel or hardware fails, a notification is sent back to the client daemon and a new install attempt is made every 60 seconds (until it succeeds). Support for external dataplanes is provided by the use of hooks to install/uninstall pseudowires. Signed-off-by: ßingen <bingen@voltanet.io> Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/debug.c')
-rw-r--r--zebra/debug.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c
index a42d5aa3ef..6f59dc0ac2 100644
--- a/zebra/debug.c
+++ b/zebra/debug.c
@@ -32,6 +32,7 @@ unsigned long zebra_debug_rib;
unsigned long zebra_debug_fpm;
unsigned long zebra_debug_nht;
unsigned long zebra_debug_mpls;
+unsigned long zebra_debug_pw;
DEFUN (show_debugging_zebra,
show_debugging_zebra_cmd,
@@ -85,6 +86,8 @@ DEFUN (show_debugging_zebra,
vty_out (vty, " Zebra next-hop tracking debugging is on%s", VTY_NEWLINE);
if (IS_ZEBRA_DEBUG_MPLS)
vty_out (vty, " Zebra MPLS debugging is on%s", VTY_NEWLINE);
+ if (IS_ZEBRA_DEBUG_PW)
+ vty_out (vty, " Zebra pseudowire debugging is on%s", VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -122,6 +125,21 @@ DEFUN (debug_zebra_mpls,
return CMD_WARNING;
}
+DEFUN (debug_zebra_pw,
+ debug_zebra_pw_cmd,
+ "[no] debug zebra pseudowires",
+ "Negate a command or set its defaults\n"
+ DEBUG_STR
+ "Zebra configuration\n"
+ "Debug option set for zebra pseudowires\n")
+{
+ if (strmatch (argv[0]->text, "no"))
+ UNSET_FLAG (zebra_debug_pw, ZEBRA_DEBUG_PW);
+ else
+ SET_FLAG (zebra_debug_pw, ZEBRA_DEBUG_PW);
+ return CMD_WARNING;
+}
+
DEFUN (debug_zebra_packet,
debug_zebra_packet_cmd,
"debug zebra packet [<recv|send>] [detail]",
@@ -410,6 +428,11 @@ config_write_debug (struct vty *vty)
vty_out (vty, "debug zebra mpls%s", VTY_NEWLINE);
write++;
}
+ if (IS_ZEBRA_DEBUG_PW)
+ {
+ vty_out (vty, "debug zebra pseudowires%s", VTY_NEWLINE);
+ write++;
+ }
return write;
}
@@ -422,6 +445,7 @@ zebra_debug_init (void)
zebra_debug_rib = 0;
zebra_debug_fpm = 0;
zebra_debug_mpls = 0;
+ zebra_debug_pw = 0;
install_node (&debug_node, config_write_debug);
@@ -430,6 +454,7 @@ zebra_debug_init (void)
install_element (ENABLE_NODE, &debug_zebra_events_cmd);
install_element (ENABLE_NODE, &debug_zebra_nht_cmd);
install_element (ENABLE_NODE, &debug_zebra_mpls_cmd);
+ install_element (ENABLE_NODE, &debug_zebra_pw_cmd);
install_element (ENABLE_NODE, &debug_zebra_packet_cmd);
install_element (ENABLE_NODE, &debug_zebra_kernel_cmd);
install_element (ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
@@ -449,6 +474,7 @@ zebra_debug_init (void)
install_element (CONFIG_NODE, &debug_zebra_events_cmd);
install_element (CONFIG_NODE, &debug_zebra_nht_cmd);
install_element (CONFIG_NODE, &debug_zebra_mpls_cmd);
+ install_element (CONFIG_NODE, &debug_zebra_pw_cmd);
install_element (CONFIG_NODE, &debug_zebra_packet_cmd);
install_element (CONFIG_NODE, &debug_zebra_kernel_cmd);
install_element (CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);