2 * Zebra debug related function
3 * Copyright (C) 1999 Kunihiro Ishiguro
5 * This file is part of GNU Zebra.
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #include "zebra/debug_clippy.c"
28 /* For debug statement. */
29 unsigned long zebra_debug_event
;
30 unsigned long zebra_debug_packet
;
31 unsigned long zebra_debug_kernel
;
32 unsigned long zebra_debug_rib
;
33 unsigned long zebra_debug_fpm
;
34 unsigned long zebra_debug_nht
;
35 unsigned long zebra_debug_mpls
;
36 unsigned long zebra_debug_vxlan
;
37 unsigned long zebra_debug_pw
;
38 unsigned long zebra_debug_dplane
;
39 unsigned long zebra_debug_dplane_dpdk
;
40 unsigned long zebra_debug_mlag
;
41 unsigned long zebra_debug_nexthop
;
42 unsigned long zebra_debug_evpn_mh
;
43 unsigned long zebra_debug_pbr
;
44 unsigned long zebra_debug_neigh
;
45 unsigned long zebra_debug_tc
;
47 DEFINE_HOOK(zebra_debug_show_debugging
, (struct vty
*vty
), (vty
));
49 DEFUN_NOSH (show_debugging_zebra
,
50 show_debugging_zebra_cmd
,
51 "show debugging [zebra]",
53 "Debugging information\n"
54 "Zebra configuration\n")
56 vty_out(vty
, "Zebra debugging status:\n");
58 if (IS_ZEBRA_DEBUG_EVENT
)
59 vty_out(vty
, " Zebra event debugging is on\n");
61 if (IS_ZEBRA_DEBUG_PACKET
) {
62 if (IS_ZEBRA_DEBUG_SEND
&& IS_ZEBRA_DEBUG_RECV
) {
63 vty_out(vty
, " Zebra packet%s debugging is on\n",
64 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
66 if (IS_ZEBRA_DEBUG_SEND
)
68 " Zebra packet send%s debugging is on\n",
69 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
72 " Zebra packet receive%s debugging is on\n",
73 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
77 if (IS_ZEBRA_DEBUG_KERNEL
)
78 vty_out(vty
, " Zebra kernel debugging is on\n");
79 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
)
81 " Zebra kernel netlink message dumps (send) are on\n");
82 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
)
84 " Zebra kernel netlink message dumps (recv) are on\n");
86 /* Check here using flags as the 'macro' does an OR */
87 if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
))
88 vty_out(vty
, " Zebra RIB detailed debugging is on\n");
89 else if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
))
90 vty_out(vty
, " Zebra RIB debugging is on\n");
92 if (IS_ZEBRA_DEBUG_FPM
)
93 vty_out(vty
, " Zebra FPM debugging is on\n");
94 if (IS_ZEBRA_DEBUG_NHT_DETAILED
)
95 vty_out(vty
, " Zebra detailed next-hop tracking debugging is on\n");
96 else if (IS_ZEBRA_DEBUG_NHT
)
97 vty_out(vty
, " Zebra next-hop tracking debugging is on\n");
98 if (IS_ZEBRA_DEBUG_MPLS_DETAIL
)
99 vty_out(vty
, " Zebra detailed MPLS debugging is on\n");
100 else if (IS_ZEBRA_DEBUG_MPLS
)
101 vty_out(vty
, " Zebra MPLS debugging is on\n");
103 if (IS_ZEBRA_DEBUG_VXLAN
)
104 vty_out(vty
, " Zebra VXLAN debugging is on\n");
105 if (IS_ZEBRA_DEBUG_PW
)
106 vty_out(vty
, " Zebra pseudowire debugging is on\n");
107 if (IS_ZEBRA_DEBUG_DPLANE_DETAIL
)
108 vty_out(vty
, " Zebra detailed dataplane debugging is on\n");
109 else if (IS_ZEBRA_DEBUG_DPLANE
)
110 vty_out(vty
, " Zebra dataplane debugging is on\n");
111 if (IS_ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
)
113 " Zebra detailed dpdk dataplane debugging is on\n");
114 else if (IS_ZEBRA_DEBUG_DPLANE_DPDK
)
115 vty_out(vty
, " Zebra dataplane dpdk debugging is on\n");
116 if (IS_ZEBRA_DEBUG_MLAG
)
117 vty_out(vty
, " Zebra mlag debugging is on\n");
118 if (IS_ZEBRA_DEBUG_NHG_DETAIL
)
119 vty_out(vty
, " Zebra detailed nexthop debugging is on\n");
120 else if (IS_ZEBRA_DEBUG_NHG
)
121 vty_out(vty
, " Zebra nexthop debugging is on\n");
123 if (IS_ZEBRA_DEBUG_EVPN_MH_ES
)
124 vty_out(vty
, " Zebra EVPN-MH ethernet segment debugging is on\n");
126 if (IS_ZEBRA_DEBUG_EVPN_MH_NH
)
127 vty_out(vty
, " Zebra EVPN-MH nexthop debugging is on\n");
129 if (IS_ZEBRA_DEBUG_EVPN_MH_MAC
)
130 vty_out(vty
, " Zebra EVPN-MH MAC debugging is on\n");
132 if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH
)
133 vty_out(vty
, " Zebra EVPN-MH Neigh debugging is on\n");
135 if (IS_ZEBRA_DEBUG_PBR
)
136 vty_out(vty
, " Zebra PBR debugging is on\n");
138 hook_call(zebra_debug_show_debugging
, vty
);
140 cmd_show_lib_debugs(vty
);
145 DEFUN (debug_zebra_events
,
146 debug_zebra_events_cmd
,
147 "debug zebra events",
149 "Zebra configuration\n"
150 "Debug option set for zebra events\n")
152 zebra_debug_event
= ZEBRA_DEBUG_EVENT
;
156 DEFUN (debug_zebra_nht
,
158 "debug zebra nht [detailed]",
160 "Zebra configuration\n"
161 "Debug option set for zebra next hop tracking\n"
162 "Debug option set for detailed info\n")
166 zebra_debug_nht
= ZEBRA_DEBUG_NHT
;
168 if (argv_find(argv
, argc
, "detailed", &idx
))
169 zebra_debug_nht
|= ZEBRA_DEBUG_NHT_DETAILED
;
174 DEFPY (debug_zebra_mpls
,
175 debug_zebra_mpls_cmd
,
176 "debug zebra mpls [detailed$detail]",
178 "Zebra configuration\n"
179 "Debug option set for zebra MPLS LSPs\n"
180 "Debug option for detailed info\n")
182 zebra_debug_mpls
= ZEBRA_DEBUG_MPLS
;
185 zebra_debug_mpls
|= ZEBRA_DEBUG_MPLS_DETAILED
;
190 DEFPY (debug_zebra_vxlan
,
191 debug_zebra_vxlan_cmd
,
194 "Zebra configuration\n"
195 "Debug option set for zebra VxLAN (EVPN)\n")
197 zebra_debug_vxlan
= ZEBRA_DEBUG_VXLAN
;
201 DEFUN (debug_zebra_pw
,
203 "[no] debug zebra pseudowires",
206 "Zebra configuration\n"
207 "Debug option set for zebra pseudowires\n")
209 if (strmatch(argv
[0]->text
, "no"))
210 UNSET_FLAG(zebra_debug_pw
, ZEBRA_DEBUG_PW
);
212 SET_FLAG(zebra_debug_pw
, ZEBRA_DEBUG_PW
);
216 DEFUN (debug_zebra_packet
,
217 debug_zebra_packet_cmd
,
218 "debug zebra packet [<recv|send>] [detail]",
220 "Zebra configuration\n"
221 "Debug option set for zebra packet\n"
222 "Debug option set for receive packet\n"
223 "Debug option set for send packet\n"
224 "Debug option set for detailed info\n")
227 zebra_debug_packet
= ZEBRA_DEBUG_PACKET
;
229 if (argv_find(argv
, argc
, "send", &idx
))
230 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_SEND
);
231 else if (argv_find(argv
, argc
, "recv", &idx
))
232 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_RECV
);
234 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_SEND
);
235 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_RECV
);
238 if (argv_find(argv
, argc
, "detail", &idx
))
239 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_DETAIL
);
244 DEFUN (debug_zebra_kernel
,
245 debug_zebra_kernel_cmd
,
246 "debug zebra kernel",
248 "Zebra configuration\n"
249 "Debug option set for zebra between kernel interface\n")
251 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL
);
256 #if defined(HAVE_NETLINK)
257 DEFUN (debug_zebra_kernel_msgdump
,
258 debug_zebra_kernel_msgdump_cmd
,
259 "debug zebra kernel msgdump [<recv|send>]",
261 "Zebra configuration\n"
262 "Debug option set for zebra between kernel interface\n"
263 "Dump raw netlink messages, sent and received\n"
264 "Dump raw netlink messages received\n"
265 "Dump raw netlink messages sent\n")
269 if (argv_find(argv
, argc
, "recv", &idx
))
270 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
271 else if (argv_find(argv
, argc
, "send", &idx
))
272 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
274 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
275 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
282 DEFUN (debug_zebra_rib
,
284 "debug zebra rib [detailed]",
286 "Zebra configuration\n"
291 SET_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
);
293 if (argv_find(argv
, argc
, "detailed", &idx
))
294 SET_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
);
299 DEFUN (debug_zebra_fpm
,
303 "Zebra configuration\n"
304 "Debug zebra FPM events\n")
306 SET_FLAG(zebra_debug_fpm
, ZEBRA_DEBUG_FPM
);
310 DEFUN (debug_zebra_dplane
,
311 debug_zebra_dplane_cmd
,
312 "debug zebra dplane [detailed]",
314 "Zebra configuration\n"
315 "Debug zebra dataplane events\n"
316 "Detailed debug information\n")
320 SET_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE
);
322 if (argv_find(argv
, argc
, "detailed", &idx
))
323 SET_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE_DETAILED
);
328 DEFPY(debug_zebra_dplane_dpdk
, debug_zebra_dplane_dpdk_cmd
,
329 "[no$no] debug zebra dplane dpdk [detailed$detail]",
331 "Zebra configuration\n"
332 "Debug zebra dataplane events\n"
333 "Debug zebra DPDK offload events\n"
334 "Detailed debug information\n")
337 UNSET_FLAG(zebra_debug_dplane_dpdk
, ZEBRA_DEBUG_DPLANE_DPDK
);
338 UNSET_FLAG(zebra_debug_dplane_dpdk
,
339 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
);
341 SET_FLAG(zebra_debug_dplane_dpdk
, ZEBRA_DEBUG_DPLANE_DPDK
);
344 SET_FLAG(zebra_debug_dplane_dpdk
,
345 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
);
351 DEFUN (debug_zebra_pbr
,
355 "Zebra configuration\n"
356 "Debug zebra pbr events\n")
358 SET_FLAG(zebra_debug_pbr
, ZEBRA_DEBUG_PBR
);
362 DEFPY (debug_zebra_neigh
,
363 debug_zebra_neigh_cmd
,
364 "[no$no] debug zebra neigh",
367 "Zebra configuration\n"
368 "Debug zebra neigh events\n")
371 UNSET_FLAG(zebra_debug_neigh
, ZEBRA_DEBUG_NEIGH
);
373 SET_FLAG(zebra_debug_neigh
, ZEBRA_DEBUG_NEIGH
);
378 DEFUN (debug_zebra_tc
,
382 "Zebra configuration\n"
383 "Debug zebra tc events\n")
385 SET_FLAG(zebra_debug_tc
, ZEBRA_DEBUG_TC
);
389 DEFPY (debug_zebra_mlag
,
390 debug_zebra_mlag_cmd
,
391 "[no$no] debug zebra mlag",
394 "Zebra configuration\n"
395 "Debug option set for mlag events\n")
398 UNSET_FLAG(zebra_debug_mlag
, ZEBRA_DEBUG_MLAG
);
400 SET_FLAG(zebra_debug_mlag
, ZEBRA_DEBUG_MLAG
);
404 DEFPY (debug_zebra_evpn_mh
,
405 debug_zebra_evpn_mh_cmd
,
406 "[no$no] debug zebra evpn mh <es$es|mac$mac|neigh$neigh|nh$nh>",
409 "Zebra configuration\n"
412 "Ethernet Segment Debugging\n"
415 "Nexthop Debugging\n")
419 UNSET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_ES
);
421 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_ES
);
426 UNSET_FLAG(zebra_debug_evpn_mh
,
427 ZEBRA_DEBUG_EVPN_MH_MAC
);
429 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_MAC
);
434 UNSET_FLAG(zebra_debug_evpn_mh
,
435 ZEBRA_DEBUG_EVPN_MH_NEIGH
);
437 SET_FLAG(zebra_debug_evpn_mh
,
438 ZEBRA_DEBUG_EVPN_MH_NEIGH
);
443 UNSET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_NH
);
445 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_NH
);
451 DEFUN (no_debug_zebra_events
,
452 no_debug_zebra_events_cmd
,
453 "no debug zebra events",
456 "Zebra configuration\n"
457 "Debug option set for zebra events\n")
459 zebra_debug_event
= 0;
463 DEFUN (no_debug_zebra_nht
,
464 no_debug_zebra_nht_cmd
,
465 "no debug zebra nht [detailed]",
468 "Zebra configuration\n"
469 "Debug option set for zebra next hop tracking\n"
470 "Debug option set for detailed info\n")
476 DEFUN (no_debug_zebra_mpls
,
477 no_debug_zebra_mpls_cmd
,
478 "no debug zebra mpls [detailed]",
481 "Zebra configuration\n"
482 "Debug option set for zebra MPLS LSPs\n"
483 "Debug option for zebra detailed info\n")
485 zebra_debug_mpls
= 0;
489 DEFUN (no_debug_zebra_vxlan
,
490 no_debug_zebra_vxlan_cmd
,
491 "no debug zebra vxlan",
494 "Zebra configuration\n"
495 "Debug option set for zebra VxLAN (EVPN)\n")
497 zebra_debug_vxlan
= 0;
501 DEFUN (no_debug_zebra_packet
,
502 no_debug_zebra_packet_cmd
,
503 "no debug zebra packet [<recv|send>] [detail]",
506 "Zebra configuration\n"
507 "Debug option set for zebra packet\n"
508 "Debug option set for receive packet\n"
509 "Debug option set for send packet\n"
510 "Debug option set for detailed info\n")
512 zebra_debug_packet
= 0;
516 DEFUN (no_debug_zebra_kernel
,
517 no_debug_zebra_kernel_cmd
,
518 "no debug zebra kernel",
521 "Zebra configuration\n"
522 "Debug option set for zebra between kernel interface\n")
524 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL
);
529 #if defined(HAVE_NETLINK)
530 DEFUN (no_debug_zebra_kernel_msgdump
,
531 no_debug_zebra_kernel_msgdump_cmd
,
532 "no debug zebra kernel msgdump [<recv|send>]",
535 "Zebra configuration\n"
536 "Debug option set for zebra between kernel interface\n"
537 "Dump raw netlink messages, sent and received\n"
538 "Dump raw netlink messages received\n"
539 "Dump raw netlink messages sent\n")
543 if (argv_find(argv
, argc
, "recv", &idx
))
544 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
545 else if (argv_find(argv
, argc
, "send", &idx
))
546 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
548 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
549 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
556 DEFUN (no_debug_zebra_rib
,
557 no_debug_zebra_rib_cmd
,
558 "no debug zebra rib [detailed]",
561 "Zebra configuration\n"
569 DEFUN (no_debug_zebra_fpm
,
570 no_debug_zebra_fpm_cmd
,
571 "no debug zebra fpm",
574 "Zebra configuration\n"
575 "Debug zebra FPM events\n")
581 DEFUN (no_debug_zebra_dplane
,
582 no_debug_zebra_dplane_cmd
,
583 "no debug zebra dplane",
586 "Zebra configuration\n"
587 "Debug zebra dataplane events\n")
589 zebra_debug_dplane
= 0;
593 DEFUN (no_debug_zebra_pbr
,
594 no_debug_zebra_pbr_cmd
,
595 "no debug zebra pbr",
598 "Zebra configuration\n"
599 "Debug zebra pbr events\n")
605 DEFPY (debug_zebra_nexthop
,
606 debug_zebra_nexthop_cmd
,
607 "[no$no] debug zebra nexthop [detail$detail]",
610 "Zebra configuration\n"
611 "Debug zebra nexthop events\n"
612 "Detailed information\n")
615 zebra_debug_nexthop
= 0;
617 SET_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG
);
620 SET_FLAG(zebra_debug_nexthop
,
621 ZEBRA_DEBUG_NHG_DETAILED
);
628 static int config_write_debug(struct vty
*vty
);
629 struct cmd_node debug_node
= {
633 .config_write
= config_write_debug
,
636 static int config_write_debug(struct vty
*vty
)
640 if (IS_ZEBRA_DEBUG_EVENT
) {
641 vty_out(vty
, "debug zebra events\n");
644 if (IS_ZEBRA_DEBUG_PACKET
) {
645 if (IS_ZEBRA_DEBUG_SEND
&& IS_ZEBRA_DEBUG_RECV
) {
646 vty_out(vty
, "debug zebra packet%s\n",
647 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
650 if (IS_ZEBRA_DEBUG_SEND
)
651 vty_out(vty
, "debug zebra packet send%s\n",
652 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
654 vty_out(vty
, "debug zebra packet recv%s\n",
655 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
660 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
661 && IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
) {
662 vty_out(vty
, "debug zebra kernel msgdump\n");
664 } else if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
) {
665 vty_out(vty
, "debug zebra kernel msgdump recv\n");
667 } else if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
) {
668 vty_out(vty
, "debug zebra kernel msgdump send\n");
672 if (IS_ZEBRA_DEBUG_KERNEL
) {
673 vty_out(vty
, "debug zebra kernel\n");
677 if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
)) {
678 vty_out(vty
, "debug zebra rib detailed\n");
680 } else if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
)) {
681 vty_out(vty
, "debug zebra rib\n");
685 if (IS_ZEBRA_DEBUG_FPM
) {
686 vty_out(vty
, "debug zebra fpm\n");
690 if (IS_ZEBRA_DEBUG_NHT_DETAILED
) {
691 vty_out(vty
, "debug zebra nht detailed\n");
693 } else if (IS_ZEBRA_DEBUG_NHT
) {
694 vty_out(vty
, "debug zebra nht\n");
698 if (IS_ZEBRA_DEBUG_MPLS_DETAIL
) {
699 vty_out(vty
, "debug zebra mpls detailed\n");
701 } else if (IS_ZEBRA_DEBUG_MPLS
) {
702 vty_out(vty
, "debug zebra mpls\n");
706 if (IS_ZEBRA_DEBUG_VXLAN
) {
707 vty_out(vty
, "debug zebra vxlan\n");
710 if (IS_ZEBRA_DEBUG_MLAG
) {
711 vty_out(vty
, "debug zebra mlag\n");
714 if (IS_ZEBRA_DEBUG_EVPN_MH_ES
) {
715 vty_out(vty
, "debug zebra evpn mh es\n");
718 if (IS_ZEBRA_DEBUG_EVPN_MH_NH
) {
719 vty_out(vty
, "debug zebra evpn mh nh\n");
722 if (IS_ZEBRA_DEBUG_EVPN_MH_MAC
) {
723 vty_out(vty
, "debug zebra evpn mh mac\n");
726 if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH
) {
727 vty_out(vty
, "debug zebra evpn mh neigh\n");
730 if (IS_ZEBRA_DEBUG_PW
) {
731 vty_out(vty
, "debug zebra pseudowires\n");
735 if (CHECK_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE_DETAILED
)) {
736 vty_out(vty
, "debug zebra dplane detailed\n");
738 } else if (CHECK_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE
)) {
739 vty_out(vty
, "debug zebra dplane\n");
743 if (CHECK_FLAG(zebra_debug_dplane_dpdk
,
744 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
)) {
745 vty_out(vty
, "debug zebra dplane dpdk detailed\n");
747 } else if (CHECK_FLAG(zebra_debug_dplane_dpdk
,
748 ZEBRA_DEBUG_DPLANE_DPDK
)) {
749 vty_out(vty
, "debug zebra dplane dpdk\n");
753 if (CHECK_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG_DETAILED
)) {
754 vty_out(vty
, "debug zebra nexthop detail\n");
756 } else if (CHECK_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG
)) {
757 vty_out(vty
, "debug zebra nexthop\n");
761 if (IS_ZEBRA_DEBUG_PBR
) {
762 vty_out(vty
, "debug zebra pbr\n");
766 if (IS_ZEBRA_DEBUG_NEIGH
) {
767 vty_out(vty
, "debug zebra neigh\n");
774 void zebra_debug_init(void)
776 zebra_debug_event
= 0;
777 zebra_debug_packet
= 0;
778 zebra_debug_kernel
= 0;
781 zebra_debug_mpls
= 0;
782 zebra_debug_vxlan
= 0;
784 zebra_debug_dplane
= 0;
785 zebra_debug_dplane_dpdk
= 0;
786 zebra_debug_mlag
= 0;
787 zebra_debug_evpn_mh
= 0;
789 zebra_debug_nexthop
= 0;
791 zebra_debug_neigh
= 0;
793 install_node(&debug_node
);
795 install_element(ENABLE_NODE
, &show_debugging_zebra_cmd
);
797 install_element(ENABLE_NODE
, &debug_zebra_events_cmd
);
798 install_element(ENABLE_NODE
, &debug_zebra_nht_cmd
);
799 install_element(ENABLE_NODE
, &debug_zebra_mpls_cmd
);
800 install_element(ENABLE_NODE
, &debug_zebra_vxlan_cmd
);
801 install_element(ENABLE_NODE
, &debug_zebra_pw_cmd
);
802 install_element(ENABLE_NODE
, &debug_zebra_packet_cmd
);
803 install_element(ENABLE_NODE
, &debug_zebra_kernel_cmd
);
804 #if defined(HAVE_NETLINK)
805 install_element(ENABLE_NODE
, &debug_zebra_kernel_msgdump_cmd
);
807 install_element(ENABLE_NODE
, &debug_zebra_rib_cmd
);
808 install_element(ENABLE_NODE
, &debug_zebra_fpm_cmd
);
809 install_element(ENABLE_NODE
, &debug_zebra_dplane_cmd
);
810 install_element(ENABLE_NODE
, &debug_zebra_mlag_cmd
);
811 install_element(ENABLE_NODE
, &debug_zebra_nexthop_cmd
);
812 install_element(ENABLE_NODE
, &debug_zebra_pbr_cmd
);
813 install_element(ENABLE_NODE
, &debug_zebra_neigh_cmd
);
814 install_element(ENABLE_NODE
, &debug_zebra_tc_cmd
);
815 install_element(ENABLE_NODE
, &debug_zebra_dplane_dpdk_cmd
);
816 install_element(ENABLE_NODE
, &no_debug_zebra_events_cmd
);
817 install_element(ENABLE_NODE
, &no_debug_zebra_nht_cmd
);
818 install_element(ENABLE_NODE
, &no_debug_zebra_mpls_cmd
);
819 install_element(ENABLE_NODE
, &no_debug_zebra_vxlan_cmd
);
820 install_element(ENABLE_NODE
, &no_debug_zebra_packet_cmd
);
821 install_element(ENABLE_NODE
, &no_debug_zebra_kernel_cmd
);
822 #if defined(HAVE_NETLINK)
823 install_element(ENABLE_NODE
, &no_debug_zebra_kernel_msgdump_cmd
);
825 install_element(ENABLE_NODE
, &no_debug_zebra_rib_cmd
);
826 install_element(ENABLE_NODE
, &no_debug_zebra_fpm_cmd
);
827 install_element(ENABLE_NODE
, &no_debug_zebra_dplane_cmd
);
828 install_element(ENABLE_NODE
, &no_debug_zebra_pbr_cmd
);
829 install_element(ENABLE_NODE
, &debug_zebra_evpn_mh_cmd
);
831 install_element(CONFIG_NODE
, &debug_zebra_events_cmd
);
832 install_element(CONFIG_NODE
, &debug_zebra_nht_cmd
);
833 install_element(CONFIG_NODE
, &debug_zebra_mpls_cmd
);
834 install_element(CONFIG_NODE
, &debug_zebra_vxlan_cmd
);
835 install_element(CONFIG_NODE
, &debug_zebra_pw_cmd
);
836 install_element(CONFIG_NODE
, &debug_zebra_packet_cmd
);
837 install_element(CONFIG_NODE
, &debug_zebra_kernel_cmd
);
838 #if defined(HAVE_NETLINK)
839 install_element(CONFIG_NODE
, &debug_zebra_kernel_msgdump_cmd
);
841 install_element(CONFIG_NODE
, &debug_zebra_rib_cmd
);
842 install_element(CONFIG_NODE
, &debug_zebra_fpm_cmd
);
843 install_element(CONFIG_NODE
, &debug_zebra_dplane_cmd
);
844 install_element(CONFIG_NODE
, &debug_zebra_dplane_dpdk_cmd
);
845 install_element(CONFIG_NODE
, &debug_zebra_nexthop_cmd
);
846 install_element(CONFIG_NODE
, &debug_zebra_pbr_cmd
);
847 install_element(CONFIG_NODE
, &debug_zebra_neigh_cmd
);
849 install_element(CONFIG_NODE
, &no_debug_zebra_events_cmd
);
850 install_element(CONFIG_NODE
, &no_debug_zebra_nht_cmd
);
851 install_element(CONFIG_NODE
, &no_debug_zebra_mpls_cmd
);
852 install_element(CONFIG_NODE
, &no_debug_zebra_vxlan_cmd
);
853 install_element(CONFIG_NODE
, &no_debug_zebra_packet_cmd
);
854 install_element(CONFIG_NODE
, &no_debug_zebra_kernel_cmd
);
855 #if defined(HAVE_NETLINK)
856 install_element(CONFIG_NODE
, &no_debug_zebra_kernel_msgdump_cmd
);
858 install_element(CONFIG_NODE
, &no_debug_zebra_rib_cmd
);
859 install_element(CONFIG_NODE
, &no_debug_zebra_fpm_cmd
);
860 install_element(CONFIG_NODE
, &no_debug_zebra_dplane_cmd
);
861 install_element(CONFIG_NODE
, &no_debug_zebra_pbr_cmd
);
862 install_element(CONFIG_NODE
, &debug_zebra_mlag_cmd
);
863 install_element(CONFIG_NODE
, &debug_zebra_evpn_mh_cmd
);