1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Zebra debug related function
4 * Copyright (C) 1999 Kunihiro Ishiguro
11 #include "zebra/debug_clippy.c"
13 /* For debug statement. */
14 unsigned long zebra_debug_event
;
15 unsigned long zebra_debug_packet
;
16 unsigned long zebra_debug_kernel
;
17 unsigned long zebra_debug_rib
;
18 unsigned long zebra_debug_fpm
;
19 unsigned long zebra_debug_nht
;
20 unsigned long zebra_debug_mpls
;
21 unsigned long zebra_debug_vxlan
;
22 unsigned long zebra_debug_pw
;
23 unsigned long zebra_debug_dplane
;
24 unsigned long zebra_debug_dplane_dpdk
;
25 unsigned long zebra_debug_mlag
;
26 unsigned long zebra_debug_nexthop
;
27 unsigned long zebra_debug_evpn_mh
;
28 unsigned long zebra_debug_pbr
;
29 unsigned long zebra_debug_neigh
;
30 unsigned long zebra_debug_tc
;
32 DEFINE_HOOK(zebra_debug_show_debugging
, (struct vty
*vty
), (vty
));
34 DEFUN_NOSH (show_debugging_zebra
,
35 show_debugging_zebra_cmd
,
36 "show debugging [zebra]",
38 "Debugging information\n"
39 "Zebra configuration\n")
41 vty_out(vty
, "Zebra debugging status:\n");
43 if (IS_ZEBRA_DEBUG_EVENT
)
44 vty_out(vty
, " Zebra event debugging is on\n");
46 if (IS_ZEBRA_DEBUG_PACKET
) {
47 if (IS_ZEBRA_DEBUG_SEND
&& IS_ZEBRA_DEBUG_RECV
) {
48 vty_out(vty
, " Zebra packet%s debugging is on\n",
49 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
51 if (IS_ZEBRA_DEBUG_SEND
)
53 " Zebra packet send%s debugging is on\n",
54 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
57 " Zebra packet receive%s debugging is on\n",
58 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
62 if (IS_ZEBRA_DEBUG_KERNEL
)
63 vty_out(vty
, " Zebra kernel debugging is on\n");
64 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
)
66 " Zebra kernel netlink message dumps (send) are on\n");
67 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
)
69 " Zebra kernel netlink message dumps (recv) are on\n");
71 /* Check here using flags as the 'macro' does an OR */
72 if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
))
73 vty_out(vty
, " Zebra RIB detailed debugging is on\n");
74 else if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
))
75 vty_out(vty
, " Zebra RIB debugging is on\n");
77 if (IS_ZEBRA_DEBUG_FPM
)
78 vty_out(vty
, " Zebra FPM debugging is on\n");
79 if (IS_ZEBRA_DEBUG_NHT_DETAILED
)
80 vty_out(vty
, " Zebra detailed next-hop tracking debugging is on\n");
81 else if (IS_ZEBRA_DEBUG_NHT
)
82 vty_out(vty
, " Zebra next-hop tracking debugging is on\n");
83 if (IS_ZEBRA_DEBUG_MPLS_DETAIL
)
84 vty_out(vty
, " Zebra detailed MPLS debugging is on\n");
85 else if (IS_ZEBRA_DEBUG_MPLS
)
86 vty_out(vty
, " Zebra MPLS debugging is on\n");
88 if (IS_ZEBRA_DEBUG_VXLAN
)
89 vty_out(vty
, " Zebra VXLAN debugging is on\n");
90 if (IS_ZEBRA_DEBUG_PW
)
91 vty_out(vty
, " Zebra pseudowire debugging is on\n");
92 if (IS_ZEBRA_DEBUG_DPLANE_DETAIL
)
93 vty_out(vty
, " Zebra detailed dataplane debugging is on\n");
94 else if (IS_ZEBRA_DEBUG_DPLANE
)
95 vty_out(vty
, " Zebra dataplane debugging is on\n");
96 if (IS_ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
)
98 " Zebra detailed dpdk dataplane debugging is on\n");
99 else if (IS_ZEBRA_DEBUG_DPLANE_DPDK
)
100 vty_out(vty
, " Zebra dataplane dpdk debugging is on\n");
101 if (IS_ZEBRA_DEBUG_MLAG
)
102 vty_out(vty
, " Zebra mlag debugging is on\n");
103 if (IS_ZEBRA_DEBUG_NHG_DETAIL
)
104 vty_out(vty
, " Zebra detailed nexthop debugging is on\n");
105 else if (IS_ZEBRA_DEBUG_NHG
)
106 vty_out(vty
, " Zebra nexthop debugging is on\n");
108 if (IS_ZEBRA_DEBUG_EVPN_MH_ES
)
109 vty_out(vty
, " Zebra EVPN-MH ethernet segment debugging is on\n");
111 if (IS_ZEBRA_DEBUG_EVPN_MH_NH
)
112 vty_out(vty
, " Zebra EVPN-MH nexthop debugging is on\n");
114 if (IS_ZEBRA_DEBUG_EVPN_MH_MAC
)
115 vty_out(vty
, " Zebra EVPN-MH MAC debugging is on\n");
117 if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH
)
118 vty_out(vty
, " Zebra EVPN-MH Neigh debugging is on\n");
120 if (IS_ZEBRA_DEBUG_PBR
)
121 vty_out(vty
, " Zebra PBR debugging is on\n");
123 hook_call(zebra_debug_show_debugging
, vty
);
125 cmd_show_lib_debugs(vty
);
130 DEFUN (debug_zebra_events
,
131 debug_zebra_events_cmd
,
132 "debug zebra events",
134 "Zebra configuration\n"
135 "Debug option set for zebra events\n")
137 zebra_debug_event
= ZEBRA_DEBUG_EVENT
;
141 DEFUN (debug_zebra_nht
,
143 "debug zebra nht [detailed]",
145 "Zebra configuration\n"
146 "Debug option set for zebra next hop tracking\n"
147 "Debug option set for detailed info\n")
151 zebra_debug_nht
= ZEBRA_DEBUG_NHT
;
153 if (argv_find(argv
, argc
, "detailed", &idx
))
154 zebra_debug_nht
|= ZEBRA_DEBUG_NHT_DETAILED
;
159 DEFPY (debug_zebra_mpls
,
160 debug_zebra_mpls_cmd
,
161 "debug zebra mpls [detailed$detail]",
163 "Zebra configuration\n"
164 "Debug option set for zebra MPLS LSPs\n"
165 "Debug option for detailed info\n")
167 zebra_debug_mpls
= ZEBRA_DEBUG_MPLS
;
170 zebra_debug_mpls
|= ZEBRA_DEBUG_MPLS_DETAILED
;
175 DEFPY (debug_zebra_vxlan
,
176 debug_zebra_vxlan_cmd
,
179 "Zebra configuration\n"
180 "Debug option set for zebra VxLAN (EVPN)\n")
182 zebra_debug_vxlan
= ZEBRA_DEBUG_VXLAN
;
186 DEFUN (debug_zebra_pw
,
188 "[no] debug zebra pseudowires",
191 "Zebra configuration\n"
192 "Debug option set for zebra pseudowires\n")
194 if (strmatch(argv
[0]->text
, "no"))
195 UNSET_FLAG(zebra_debug_pw
, ZEBRA_DEBUG_PW
);
197 SET_FLAG(zebra_debug_pw
, ZEBRA_DEBUG_PW
);
201 DEFUN (debug_zebra_packet
,
202 debug_zebra_packet_cmd
,
203 "debug zebra packet [<recv|send>] [detail]",
205 "Zebra configuration\n"
206 "Debug option set for zebra packet\n"
207 "Debug option set for receive packet\n"
208 "Debug option set for send packet\n"
209 "Debug option set for detailed info\n")
212 zebra_debug_packet
= ZEBRA_DEBUG_PACKET
;
214 if (argv_find(argv
, argc
, "send", &idx
))
215 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_SEND
);
216 else if (argv_find(argv
, argc
, "recv", &idx
))
217 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_RECV
);
219 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_SEND
);
220 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_RECV
);
223 if (argv_find(argv
, argc
, "detail", &idx
))
224 SET_FLAG(zebra_debug_packet
, ZEBRA_DEBUG_DETAIL
);
229 DEFUN (debug_zebra_kernel
,
230 debug_zebra_kernel_cmd
,
231 "debug zebra kernel",
233 "Zebra configuration\n"
234 "Debug option set for zebra between kernel interface\n")
236 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL
);
241 #if defined(HAVE_NETLINK)
242 DEFUN (debug_zebra_kernel_msgdump
,
243 debug_zebra_kernel_msgdump_cmd
,
244 "debug zebra kernel msgdump [<recv|send>]",
246 "Zebra configuration\n"
247 "Debug option set for zebra between kernel interface\n"
248 "Dump raw netlink messages, sent and received\n"
249 "Dump raw netlink messages received\n"
250 "Dump raw netlink messages sent\n")
254 if (argv_find(argv
, argc
, "recv", &idx
))
255 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
256 else if (argv_find(argv
, argc
, "send", &idx
))
257 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
259 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
260 SET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
267 DEFUN (debug_zebra_rib
,
269 "debug zebra rib [detailed]",
271 "Zebra configuration\n"
276 SET_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
);
278 if (argv_find(argv
, argc
, "detailed", &idx
))
279 SET_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
);
284 DEFUN (debug_zebra_fpm
,
288 "Zebra configuration\n"
289 "Debug zebra FPM events\n")
291 SET_FLAG(zebra_debug_fpm
, ZEBRA_DEBUG_FPM
);
295 DEFUN (debug_zebra_dplane
,
296 debug_zebra_dplane_cmd
,
297 "debug zebra dplane [detailed]",
299 "Zebra configuration\n"
300 "Debug zebra dataplane events\n"
301 "Detailed debug information\n")
305 SET_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE
);
307 if (argv_find(argv
, argc
, "detailed", &idx
))
308 SET_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE_DETAILED
);
313 DEFPY(debug_zebra_dplane_dpdk
, debug_zebra_dplane_dpdk_cmd
,
314 "[no$no] debug zebra dplane dpdk [detailed$detail]",
316 "Zebra configuration\n"
317 "Debug zebra dataplane events\n"
318 "Debug zebra DPDK offload events\n"
319 "Detailed debug information\n")
322 UNSET_FLAG(zebra_debug_dplane_dpdk
, ZEBRA_DEBUG_DPLANE_DPDK
);
323 UNSET_FLAG(zebra_debug_dplane_dpdk
,
324 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
);
326 SET_FLAG(zebra_debug_dplane_dpdk
, ZEBRA_DEBUG_DPLANE_DPDK
);
329 SET_FLAG(zebra_debug_dplane_dpdk
,
330 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
);
336 DEFUN (debug_zebra_pbr
,
340 "Zebra configuration\n"
341 "Debug zebra pbr events\n")
343 SET_FLAG(zebra_debug_pbr
, ZEBRA_DEBUG_PBR
);
347 DEFPY (debug_zebra_neigh
,
348 debug_zebra_neigh_cmd
,
349 "[no$no] debug zebra neigh",
352 "Zebra configuration\n"
353 "Debug zebra neigh events\n")
356 UNSET_FLAG(zebra_debug_neigh
, ZEBRA_DEBUG_NEIGH
);
358 SET_FLAG(zebra_debug_neigh
, ZEBRA_DEBUG_NEIGH
);
363 DEFUN (debug_zebra_tc
,
367 "Zebra configuration\n"
368 "Debug zebra tc events\n")
370 SET_FLAG(zebra_debug_tc
, ZEBRA_DEBUG_TC
);
374 DEFPY (debug_zebra_mlag
,
375 debug_zebra_mlag_cmd
,
376 "[no$no] debug zebra mlag",
379 "Zebra configuration\n"
380 "Debug option set for mlag events\n")
383 UNSET_FLAG(zebra_debug_mlag
, ZEBRA_DEBUG_MLAG
);
385 SET_FLAG(zebra_debug_mlag
, ZEBRA_DEBUG_MLAG
);
389 DEFPY (debug_zebra_evpn_mh
,
390 debug_zebra_evpn_mh_cmd
,
391 "[no$no] debug zebra evpn mh <es$es|mac$mac|neigh$neigh|nh$nh>",
394 "Zebra configuration\n"
397 "Ethernet Segment Debugging\n"
400 "Nexthop Debugging\n")
404 UNSET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_ES
);
406 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_ES
);
411 UNSET_FLAG(zebra_debug_evpn_mh
,
412 ZEBRA_DEBUG_EVPN_MH_MAC
);
414 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_MAC
);
419 UNSET_FLAG(zebra_debug_evpn_mh
,
420 ZEBRA_DEBUG_EVPN_MH_NEIGH
);
422 SET_FLAG(zebra_debug_evpn_mh
,
423 ZEBRA_DEBUG_EVPN_MH_NEIGH
);
428 UNSET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_NH
);
430 SET_FLAG(zebra_debug_evpn_mh
, ZEBRA_DEBUG_EVPN_MH_NH
);
436 DEFUN (no_debug_zebra_events
,
437 no_debug_zebra_events_cmd
,
438 "no debug zebra events",
441 "Zebra configuration\n"
442 "Debug option set for zebra events\n")
444 zebra_debug_event
= 0;
448 DEFUN (no_debug_zebra_nht
,
449 no_debug_zebra_nht_cmd
,
450 "no debug zebra nht [detailed]",
453 "Zebra configuration\n"
454 "Debug option set for zebra next hop tracking\n"
455 "Debug option set for detailed info\n")
461 DEFUN (no_debug_zebra_mpls
,
462 no_debug_zebra_mpls_cmd
,
463 "no debug zebra mpls [detailed]",
466 "Zebra configuration\n"
467 "Debug option set for zebra MPLS LSPs\n"
468 "Debug option for zebra detailed info\n")
470 zebra_debug_mpls
= 0;
474 DEFUN (no_debug_zebra_vxlan
,
475 no_debug_zebra_vxlan_cmd
,
476 "no debug zebra vxlan",
479 "Zebra configuration\n"
480 "Debug option set for zebra VxLAN (EVPN)\n")
482 zebra_debug_vxlan
= 0;
486 DEFUN (no_debug_zebra_packet
,
487 no_debug_zebra_packet_cmd
,
488 "no debug zebra packet [<recv|send>] [detail]",
491 "Zebra configuration\n"
492 "Debug option set for zebra packet\n"
493 "Debug option set for receive packet\n"
494 "Debug option set for send packet\n"
495 "Debug option set for detailed info\n")
497 zebra_debug_packet
= 0;
501 DEFUN (no_debug_zebra_kernel
,
502 no_debug_zebra_kernel_cmd
,
503 "no debug zebra kernel",
506 "Zebra configuration\n"
507 "Debug option set for zebra between kernel interface\n")
509 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL
);
514 #if defined(HAVE_NETLINK)
515 DEFUN (no_debug_zebra_kernel_msgdump
,
516 no_debug_zebra_kernel_msgdump_cmd
,
517 "no debug zebra kernel msgdump [<recv|send>]",
520 "Zebra configuration\n"
521 "Debug option set for zebra between kernel interface\n"
522 "Dump raw netlink messages, sent and received\n"
523 "Dump raw netlink messages received\n"
524 "Dump raw netlink messages sent\n")
528 if (argv_find(argv
, argc
, "recv", &idx
))
529 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
530 else if (argv_find(argv
, argc
, "send", &idx
))
531 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
533 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
);
534 UNSET_FLAG(zebra_debug_kernel
, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
);
541 DEFUN (no_debug_zebra_rib
,
542 no_debug_zebra_rib_cmd
,
543 "no debug zebra rib [detailed]",
546 "Zebra configuration\n"
554 DEFUN (no_debug_zebra_fpm
,
555 no_debug_zebra_fpm_cmd
,
556 "no debug zebra fpm",
559 "Zebra configuration\n"
560 "Debug zebra FPM events\n")
566 DEFUN (no_debug_zebra_dplane
,
567 no_debug_zebra_dplane_cmd
,
568 "no debug zebra dplane",
571 "Zebra configuration\n"
572 "Debug zebra dataplane events\n")
574 zebra_debug_dplane
= 0;
578 DEFUN (no_debug_zebra_pbr
,
579 no_debug_zebra_pbr_cmd
,
580 "no debug zebra pbr",
583 "Zebra configuration\n"
584 "Debug zebra pbr events\n")
590 DEFPY (debug_zebra_nexthop
,
591 debug_zebra_nexthop_cmd
,
592 "[no$no] debug zebra nexthop [detail$detail]",
595 "Zebra configuration\n"
596 "Debug zebra nexthop events\n"
597 "Detailed information\n")
600 zebra_debug_nexthop
= 0;
602 SET_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG
);
605 SET_FLAG(zebra_debug_nexthop
,
606 ZEBRA_DEBUG_NHG_DETAILED
);
613 static int config_write_debug(struct vty
*vty
);
614 struct cmd_node debug_node
= {
618 .config_write
= config_write_debug
,
621 static int config_write_debug(struct vty
*vty
)
625 if (IS_ZEBRA_DEBUG_EVENT
) {
626 vty_out(vty
, "debug zebra events\n");
629 if (IS_ZEBRA_DEBUG_PACKET
) {
630 if (IS_ZEBRA_DEBUG_SEND
&& IS_ZEBRA_DEBUG_RECV
) {
631 vty_out(vty
, "debug zebra packet%s\n",
632 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
635 if (IS_ZEBRA_DEBUG_SEND
)
636 vty_out(vty
, "debug zebra packet send%s\n",
637 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
639 vty_out(vty
, "debug zebra packet recv%s\n",
640 IS_ZEBRA_DEBUG_DETAIL
? " detail" : "");
645 if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
646 && IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
) {
647 vty_out(vty
, "debug zebra kernel msgdump\n");
649 } else if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV
) {
650 vty_out(vty
, "debug zebra kernel msgdump recv\n");
652 } else if (IS_ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND
) {
653 vty_out(vty
, "debug zebra kernel msgdump send\n");
657 if (IS_ZEBRA_DEBUG_KERNEL
) {
658 vty_out(vty
, "debug zebra kernel\n");
662 if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB_DETAILED
)) {
663 vty_out(vty
, "debug zebra rib detailed\n");
665 } else if (CHECK_FLAG(zebra_debug_rib
, ZEBRA_DEBUG_RIB
)) {
666 vty_out(vty
, "debug zebra rib\n");
670 if (IS_ZEBRA_DEBUG_FPM
) {
671 vty_out(vty
, "debug zebra fpm\n");
675 if (IS_ZEBRA_DEBUG_NHT_DETAILED
) {
676 vty_out(vty
, "debug zebra nht detailed\n");
678 } else if (IS_ZEBRA_DEBUG_NHT
) {
679 vty_out(vty
, "debug zebra nht\n");
683 if (IS_ZEBRA_DEBUG_MPLS_DETAIL
) {
684 vty_out(vty
, "debug zebra mpls detailed\n");
686 } else if (IS_ZEBRA_DEBUG_MPLS
) {
687 vty_out(vty
, "debug zebra mpls\n");
691 if (IS_ZEBRA_DEBUG_VXLAN
) {
692 vty_out(vty
, "debug zebra vxlan\n");
695 if (IS_ZEBRA_DEBUG_MLAG
) {
696 vty_out(vty
, "debug zebra mlag\n");
699 if (IS_ZEBRA_DEBUG_EVPN_MH_ES
) {
700 vty_out(vty
, "debug zebra evpn mh es\n");
703 if (IS_ZEBRA_DEBUG_EVPN_MH_NH
) {
704 vty_out(vty
, "debug zebra evpn mh nh\n");
707 if (IS_ZEBRA_DEBUG_EVPN_MH_MAC
) {
708 vty_out(vty
, "debug zebra evpn mh mac\n");
711 if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH
) {
712 vty_out(vty
, "debug zebra evpn mh neigh\n");
715 if (IS_ZEBRA_DEBUG_PW
) {
716 vty_out(vty
, "debug zebra pseudowires\n");
720 if (CHECK_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE_DETAILED
)) {
721 vty_out(vty
, "debug zebra dplane detailed\n");
723 } else if (CHECK_FLAG(zebra_debug_dplane
, ZEBRA_DEBUG_DPLANE
)) {
724 vty_out(vty
, "debug zebra dplane\n");
728 if (CHECK_FLAG(zebra_debug_dplane_dpdk
,
729 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL
)) {
730 vty_out(vty
, "debug zebra dplane dpdk detailed\n");
732 } else if (CHECK_FLAG(zebra_debug_dplane_dpdk
,
733 ZEBRA_DEBUG_DPLANE_DPDK
)) {
734 vty_out(vty
, "debug zebra dplane dpdk\n");
738 if (CHECK_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG_DETAILED
)) {
739 vty_out(vty
, "debug zebra nexthop detail\n");
741 } else if (CHECK_FLAG(zebra_debug_nexthop
, ZEBRA_DEBUG_NHG
)) {
742 vty_out(vty
, "debug zebra nexthop\n");
746 if (IS_ZEBRA_DEBUG_PBR
) {
747 vty_out(vty
, "debug zebra pbr\n");
751 if (IS_ZEBRA_DEBUG_NEIGH
) {
752 vty_out(vty
, "debug zebra neigh\n");
759 void zebra_debug_init(void)
761 zebra_debug_event
= 0;
762 zebra_debug_packet
= 0;
763 zebra_debug_kernel
= 0;
766 zebra_debug_mpls
= 0;
767 zebra_debug_vxlan
= 0;
769 zebra_debug_dplane
= 0;
770 zebra_debug_dplane_dpdk
= 0;
771 zebra_debug_mlag
= 0;
772 zebra_debug_evpn_mh
= 0;
774 zebra_debug_nexthop
= 0;
776 zebra_debug_neigh
= 0;
778 install_node(&debug_node
);
780 install_element(ENABLE_NODE
, &show_debugging_zebra_cmd
);
782 install_element(ENABLE_NODE
, &debug_zebra_events_cmd
);
783 install_element(ENABLE_NODE
, &debug_zebra_nht_cmd
);
784 install_element(ENABLE_NODE
, &debug_zebra_mpls_cmd
);
785 install_element(ENABLE_NODE
, &debug_zebra_vxlan_cmd
);
786 install_element(ENABLE_NODE
, &debug_zebra_pw_cmd
);
787 install_element(ENABLE_NODE
, &debug_zebra_packet_cmd
);
788 install_element(ENABLE_NODE
, &debug_zebra_kernel_cmd
);
789 #if defined(HAVE_NETLINK)
790 install_element(ENABLE_NODE
, &debug_zebra_kernel_msgdump_cmd
);
792 install_element(ENABLE_NODE
, &debug_zebra_rib_cmd
);
793 install_element(ENABLE_NODE
, &debug_zebra_fpm_cmd
);
794 install_element(ENABLE_NODE
, &debug_zebra_dplane_cmd
);
795 install_element(ENABLE_NODE
, &debug_zebra_mlag_cmd
);
796 install_element(ENABLE_NODE
, &debug_zebra_nexthop_cmd
);
797 install_element(ENABLE_NODE
, &debug_zebra_pbr_cmd
);
798 install_element(ENABLE_NODE
, &debug_zebra_neigh_cmd
);
799 install_element(ENABLE_NODE
, &debug_zebra_tc_cmd
);
800 install_element(ENABLE_NODE
, &debug_zebra_dplane_dpdk_cmd
);
801 install_element(ENABLE_NODE
, &no_debug_zebra_events_cmd
);
802 install_element(ENABLE_NODE
, &no_debug_zebra_nht_cmd
);
803 install_element(ENABLE_NODE
, &no_debug_zebra_mpls_cmd
);
804 install_element(ENABLE_NODE
, &no_debug_zebra_vxlan_cmd
);
805 install_element(ENABLE_NODE
, &no_debug_zebra_packet_cmd
);
806 install_element(ENABLE_NODE
, &no_debug_zebra_kernel_cmd
);
807 #if defined(HAVE_NETLINK)
808 install_element(ENABLE_NODE
, &no_debug_zebra_kernel_msgdump_cmd
);
810 install_element(ENABLE_NODE
, &no_debug_zebra_rib_cmd
);
811 install_element(ENABLE_NODE
, &no_debug_zebra_fpm_cmd
);
812 install_element(ENABLE_NODE
, &no_debug_zebra_dplane_cmd
);
813 install_element(ENABLE_NODE
, &no_debug_zebra_pbr_cmd
);
814 install_element(ENABLE_NODE
, &debug_zebra_evpn_mh_cmd
);
816 install_element(CONFIG_NODE
, &debug_zebra_events_cmd
);
817 install_element(CONFIG_NODE
, &debug_zebra_nht_cmd
);
818 install_element(CONFIG_NODE
, &debug_zebra_mpls_cmd
);
819 install_element(CONFIG_NODE
, &debug_zebra_vxlan_cmd
);
820 install_element(CONFIG_NODE
, &debug_zebra_pw_cmd
);
821 install_element(CONFIG_NODE
, &debug_zebra_packet_cmd
);
822 install_element(CONFIG_NODE
, &debug_zebra_kernel_cmd
);
823 #if defined(HAVE_NETLINK)
824 install_element(CONFIG_NODE
, &debug_zebra_kernel_msgdump_cmd
);
826 install_element(CONFIG_NODE
, &debug_zebra_rib_cmd
);
827 install_element(CONFIG_NODE
, &debug_zebra_fpm_cmd
);
828 install_element(CONFIG_NODE
, &debug_zebra_dplane_cmd
);
829 install_element(CONFIG_NODE
, &debug_zebra_dplane_dpdk_cmd
);
830 install_element(CONFIG_NODE
, &debug_zebra_nexthop_cmd
);
831 install_element(CONFIG_NODE
, &debug_zebra_pbr_cmd
);
832 install_element(CONFIG_NODE
, &debug_zebra_neigh_cmd
);
834 install_element(CONFIG_NODE
, &no_debug_zebra_events_cmd
);
835 install_element(CONFIG_NODE
, &no_debug_zebra_nht_cmd
);
836 install_element(CONFIG_NODE
, &no_debug_zebra_mpls_cmd
);
837 install_element(CONFIG_NODE
, &no_debug_zebra_vxlan_cmd
);
838 install_element(CONFIG_NODE
, &no_debug_zebra_packet_cmd
);
839 install_element(CONFIG_NODE
, &no_debug_zebra_kernel_cmd
);
840 #if defined(HAVE_NETLINK)
841 install_element(CONFIG_NODE
, &no_debug_zebra_kernel_msgdump_cmd
);
843 install_element(CONFIG_NODE
, &no_debug_zebra_rib_cmd
);
844 install_element(CONFIG_NODE
, &no_debug_zebra_fpm_cmd
);
845 install_element(CONFIG_NODE
, &no_debug_zebra_dplane_cmd
);
846 install_element(CONFIG_NODE
, &no_debug_zebra_pbr_cmd
);
847 install_element(CONFIG_NODE
, &debug_zebra_mlag_cmd
);
848 install_element(CONFIG_NODE
, &debug_zebra_evpn_mh_cmd
);