]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_trace.h
Merge pull request #12544 from mjstapp/fix_pathd_sa_pcep_config
[mirror_frr.git] / zebra / zebra_trace.h
CommitLineData
d42e6142
DS
1/* Tracing for zebra
2 *
3 * Copyright (C) 2020 NVIDIA Corporation
4 * Donald Sharp
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#if !defined(__ZEBRA_TRACE_H__) || defined(TRACEPOINT_HEADER_MULTI_READ)
22#define __ZEBRA_TRACE_H__
23
24#include "lib/trace.h"
25
26#ifdef HAVE_LTTNG
27
28#undef TRACEPOINT_PROVIDER
29#define TRACEPOINT_PROVIDER frr_zebra
30
31#undef TRACEPOINT_INCLUDE
32#define TRACEPOINT_INCLUDE "zebra/zebra_trace.h"
33
34#include <lttng/tracepoint.h>
35
36#include <lib/ns.h>
37#include <lib/table.h>
38
097ef2af
DS
39#include <zebra/zebra_ns.h>
40
41TRACEPOINT_EVENT(
42 frr_zebra,
43 netlink_request_intf_addr,
44 TP_ARGS(struct nlsock *, netlink_cmd,
45 int, family,
46 int, type,
47 uint32_t, filter_mask),
48 TP_FIELDS(
49 ctf_integer_hex(intptr_t, netlink_cmd, netlink_cmd)
50 ctf_integer(int, family, family)
51 ctf_integer(int, type, type)
52 ctf_integer(uint32_t, filter_mask, filter_mask)
53 )
54 )
55
d42e6142
DS
56TRACEPOINT_EVENT(
57 frr_zebra,
58 netlink_interface,
59 TP_ARGS(
0bba3bd8 60 struct nlmsghdr *, header,
d42e6142
DS
61 ns_id_t, ns_id,
62 int, startup),
63 TP_FIELDS(
0bba3bd8 64 ctf_integer_hex(intptr_t, header, header)
d42e6142
DS
65 ctf_integer(uint32_t, ns_id, ns_id)
66 ctf_integer(uint32_t, startup, startup)
67 )
68 )
69
1d80c209
DS
70TRACEPOINT_EVENT(
71 frr_zebra,
72 netlink_nexthop_change,
73 TP_ARGS(
0bba3bd8 74 struct nlmsghdr *, header,
1d80c209
DS
75 ns_id_t, ns_id,
76 int, startup),
77 TP_FIELDS(
0bba3bd8 78 ctf_integer_hex(intptr_t, header, header)
1d80c209
DS
79 ctf_integer(uint32_t, ns_id, ns_id)
80 ctf_integer(uint32_t, startup, startup)
81 )
82 )
83
14ed0615
DS
84TRACEPOINT_EVENT(
85 frr_zebra,
86 netlink_interface_addr,
87 TP_ARGS(
0bba3bd8 88 struct nlmsghdr *, header,
14ed0615
DS
89 ns_id_t, ns_id,
90 int, startup),
91 TP_FIELDS(
0bba3bd8 92 ctf_integer_hex(intptr_t, header, header)
14ed0615
DS
93 ctf_integer(uint32_t, ns_id, ns_id)
94 ctf_integer(uint32_t, startup, startup)
95 )
96 )
97
3cee2135
DS
98TRACEPOINT_EVENT(
99 frr_zebra,
100 netlink_route_change_read_unicast,
101 TP_ARGS(
0bba3bd8 102 struct nlmsghdr *, header,
3cee2135
DS
103 ns_id_t, ns_id,
104 int, startup),
105 TP_FIELDS(
0bba3bd8 106 ctf_integer_hex(intptr_t, header, header)
3cee2135
DS
107 ctf_integer(uint32_t, ns_id, ns_id)
108 ctf_integer(uint32_t, startup, startup)
109 )
110 )
1239b60c
DS
111
112TRACEPOINT_EVENT(
113 frr_zebra,
114 netlink_rule_change,
115 TP_ARGS(
0bba3bd8 116 struct nlmsghdr *, header,
1239b60c
DS
117 ns_id_t, ns_id,
118 int, startup),
119 TP_FIELDS(
0bba3bd8 120 ctf_integer_hex(intptr_t, header, header)
1239b60c
DS
121 ctf_integer(uint32_t, ns_id, ns_id)
122 ctf_integer(uint32_t, startup, startup)
123 )
124 )
125
bcb486dd
DS
126TRACEPOINT_EVENT(
127 frr_zebra,
128 netlink_tc_qdisc_change,
129 TP_ARGS(
130 struct nlmsghdr *, header,
131 ns_id_t, ns_id,
132 int, startup),
133 TP_FIELDS(
134 ctf_integer_hex(intptr_t, header, header)
135 ctf_integer(uint32_t, ns_id, ns_id)
136 ctf_integer(uint32_t, startup, startup)
137 )
138 )
139
140TRACEPOINT_EVENT(
141 frr_zebra,
142 netlink_tc_class_change,
143 TP_ARGS(
144 struct nlmsghdr *, header,
145 ns_id_t, ns_id,
146 int, startup),
147 TP_FIELDS(
148 ctf_integer_hex(intptr_t, header, header)
149 ctf_integer(uint32_t, ns_id, ns_id)
150 ctf_integer(uint32_t, startup, startup)
151 )
152 )
153
154
155TRACEPOINT_EVENT(
156 frr_zebra,
157 netlink_tc_filter_change,
158 TP_ARGS(
159 struct nlmsghdr *, header,
160 ns_id_t, ns_id,
161 int, startup),
162 TP_FIELDS(
163 ctf_integer_hex(intptr_t, header, header)
164 ctf_integer(uint32_t, ns_id, ns_id)
165 ctf_integer(uint32_t, startup, startup)
166 )
167 )
168
d42e6142
DS
169#include <lttng/tracepoint-event.h>
170
171#endif /* HAVE_LTTNG */
172
173#endif /* __ZEBRA_TRACE_H__ */