]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
d42e6142 DS |
2 | /* Tracing for zebra |
3 | * | |
4 | * Copyright (C) 2020 NVIDIA Corporation | |
5 | * Donald Sharp | |
d42e6142 DS |
6 | */ |
7 | ||
8 | #if !defined(__ZEBRA_TRACE_H__) || defined(TRACEPOINT_HEADER_MULTI_READ) | |
9 | #define __ZEBRA_TRACE_H__ | |
10 | ||
11 | #include "lib/trace.h" | |
12 | ||
13 | #ifdef HAVE_LTTNG | |
14 | ||
15 | #undef TRACEPOINT_PROVIDER | |
16 | #define TRACEPOINT_PROVIDER frr_zebra | |
17 | ||
18 | #undef TRACEPOINT_INCLUDE | |
19 | #define TRACEPOINT_INCLUDE "zebra/zebra_trace.h" | |
20 | ||
21 | #include <lttng/tracepoint.h> | |
22 | ||
23 | #include <lib/ns.h> | |
24 | #include <lib/table.h> | |
25 | ||
097ef2af DS |
26 | #include <zebra/zebra_ns.h> |
27 | ||
28 | TRACEPOINT_EVENT( | |
29 | frr_zebra, | |
30 | netlink_request_intf_addr, | |
31 | TP_ARGS(struct nlsock *, netlink_cmd, | |
32 | int, family, | |
33 | int, type, | |
34 | uint32_t, filter_mask), | |
35 | TP_FIELDS( | |
36 | ctf_integer_hex(intptr_t, netlink_cmd, netlink_cmd) | |
37 | ctf_integer(int, family, family) | |
38 | ctf_integer(int, type, type) | |
39 | ctf_integer(uint32_t, filter_mask, filter_mask) | |
40 | ) | |
41 | ) | |
42 | ||
d42e6142 DS |
43 | TRACEPOINT_EVENT( |
44 | frr_zebra, | |
45 | netlink_interface, | |
46 | TP_ARGS( | |
0bba3bd8 | 47 | struct nlmsghdr *, header, |
d42e6142 DS |
48 | ns_id_t, ns_id, |
49 | int, startup), | |
50 | TP_FIELDS( | |
0bba3bd8 | 51 | ctf_integer_hex(intptr_t, header, header) |
d42e6142 DS |
52 | ctf_integer(uint32_t, ns_id, ns_id) |
53 | ctf_integer(uint32_t, startup, startup) | |
54 | ) | |
55 | ) | |
56 | ||
1d80c209 DS |
57 | TRACEPOINT_EVENT( |
58 | frr_zebra, | |
59 | netlink_nexthop_change, | |
60 | TP_ARGS( | |
0bba3bd8 | 61 | struct nlmsghdr *, header, |
1d80c209 DS |
62 | ns_id_t, ns_id, |
63 | int, startup), | |
64 | TP_FIELDS( | |
0bba3bd8 | 65 | ctf_integer_hex(intptr_t, header, header) |
1d80c209 DS |
66 | ctf_integer(uint32_t, ns_id, ns_id) |
67 | ctf_integer(uint32_t, startup, startup) | |
68 | ) | |
69 | ) | |
70 | ||
14ed0615 DS |
71 | TRACEPOINT_EVENT( |
72 | frr_zebra, | |
73 | netlink_interface_addr, | |
74 | TP_ARGS( | |
0bba3bd8 | 75 | struct nlmsghdr *, header, |
14ed0615 DS |
76 | ns_id_t, ns_id, |
77 | int, startup), | |
78 | TP_FIELDS( | |
0bba3bd8 | 79 | ctf_integer_hex(intptr_t, header, header) |
14ed0615 DS |
80 | ctf_integer(uint32_t, ns_id, ns_id) |
81 | ctf_integer(uint32_t, startup, startup) | |
82 | ) | |
83 | ) | |
84 | ||
3cee2135 DS |
85 | TRACEPOINT_EVENT( |
86 | frr_zebra, | |
87 | netlink_route_change_read_unicast, | |
88 | TP_ARGS( | |
0bba3bd8 | 89 | struct nlmsghdr *, header, |
3cee2135 DS |
90 | ns_id_t, ns_id, |
91 | int, startup), | |
92 | TP_FIELDS( | |
0bba3bd8 | 93 | ctf_integer_hex(intptr_t, header, header) |
3cee2135 DS |
94 | ctf_integer(uint32_t, ns_id, ns_id) |
95 | ctf_integer(uint32_t, startup, startup) | |
96 | ) | |
97 | ) | |
1239b60c DS |
98 | |
99 | TRACEPOINT_EVENT( | |
100 | frr_zebra, | |
101 | netlink_rule_change, | |
102 | TP_ARGS( | |
0bba3bd8 | 103 | struct nlmsghdr *, header, |
1239b60c DS |
104 | ns_id_t, ns_id, |
105 | int, startup), | |
106 | TP_FIELDS( | |
0bba3bd8 | 107 | ctf_integer_hex(intptr_t, header, header) |
1239b60c DS |
108 | ctf_integer(uint32_t, ns_id, ns_id) |
109 | ctf_integer(uint32_t, startup, startup) | |
110 | ) | |
111 | ) | |
112 | ||
bcb486dd DS |
113 | TRACEPOINT_EVENT( |
114 | frr_zebra, | |
115 | netlink_tc_qdisc_change, | |
116 | TP_ARGS( | |
117 | struct nlmsghdr *, header, | |
118 | ns_id_t, ns_id, | |
119 | int, startup), | |
120 | TP_FIELDS( | |
121 | ctf_integer_hex(intptr_t, header, header) | |
122 | ctf_integer(uint32_t, ns_id, ns_id) | |
123 | ctf_integer(uint32_t, startup, startup) | |
124 | ) | |
125 | ) | |
126 | ||
127 | TRACEPOINT_EVENT( | |
128 | frr_zebra, | |
129 | netlink_tc_class_change, | |
130 | TP_ARGS( | |
131 | struct nlmsghdr *, header, | |
132 | ns_id_t, ns_id, | |
133 | int, startup), | |
134 | TP_FIELDS( | |
135 | ctf_integer_hex(intptr_t, header, header) | |
136 | ctf_integer(uint32_t, ns_id, ns_id) | |
137 | ctf_integer(uint32_t, startup, startup) | |
138 | ) | |
139 | ) | |
140 | ||
141 | ||
142 | TRACEPOINT_EVENT( | |
143 | frr_zebra, | |
144 | netlink_tc_filter_change, | |
145 | TP_ARGS( | |
146 | struct nlmsghdr *, header, | |
147 | ns_id_t, ns_id, | |
148 | int, startup), | |
149 | TP_FIELDS( | |
150 | ctf_integer_hex(intptr_t, header, header) | |
151 | ctf_integer(uint32_t, ns_id, ns_id) | |
152 | ctf_integer(uint32_t, startup, startup) | |
153 | ) | |
154 | ) | |
155 | ||
d42e6142 DS |
156 | #include <lttng/tracepoint-event.h> |
157 | ||
158 | #endif /* HAVE_LTTNG */ | |
159 | ||
160 | #endif /* __ZEBRA_TRACE_H__ */ |