Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
b283666f PW |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM net | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_NET_H | |
b283666f | 7 | |
6ec43db8 | 8 | #include <probes/lttng-tracepoint-event.h> |
b283666f PW |
9 | #include <linux/skbuff.h> |
10 | #include <linux/netdevice.h> | |
11 | #include <linux/ip.h> | |
e5990fd4 GB |
12 | #include <linux/ipv6.h> |
13 | #include <linux/tcp.h> | |
4a7363f7 | 14 | #include <linux/version.h> |
e5990fd4 GB |
15 | #include <lttng-endian.h> |
16 | #include <net/sock.h> | |
17 | ||
18 | #ifndef ONCE_LTTNG_NET_H | |
19 | #define ONCE_LTTNG_NET_H | |
20 | ||
21 | static inline unsigned char __has_network_hdr(struct sk_buff *skb) | |
22 | { | |
23 | /* | |
aa900596 MD |
24 | * If the header is not set yet, the network header will point |
25 | * to the head. | |
e5990fd4 GB |
26 | */ |
27 | return skb_network_header(skb) != skb->head; | |
28 | } | |
29 | ||
30 | static struct lttng_event_field emptyfields[] = { | |
31 | }; | |
32 | ||
9cf9736a GB |
33 | /* Structures for transport headers. */ |
34 | ||
35 | static struct lttng_event_field tcpfields[] = { | |
36 | [0] = { | |
37 | .name = "source_port", | |
aa900596 MD |
38 | .type = __type_integer(uint16_t, 0, 0, 0, |
39 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
40 | }, |
41 | [1] = { | |
42 | .name = "dest_port", | |
aa900596 MD |
43 | .type = __type_integer(uint16_t, 0, 0, 0, |
44 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
45 | }, |
46 | [2] = { | |
47 | .name = "seq", | |
aa900596 MD |
48 | .type = __type_integer(uint32_t, 0, 0, 0, |
49 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
50 | }, |
51 | [3] = { | |
52 | .name = "ack_seq", | |
aa900596 MD |
53 | .type = __type_integer(uint32_t, 0, 0, 0, |
54 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
55 | }, |
56 | [4] = { | |
57 | .name = "data_offset", | |
aa900596 MD |
58 | .type = __type_integer(uint8_t, 4, 4, 0, |
59 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
60 | }, |
61 | [5] = { | |
62 | .name = "reserved", | |
aa900596 MD |
63 | .type = __type_integer(uint8_t, 3, 1, 0, |
64 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
65 | }, |
66 | [6] = { | |
67 | .name = "flags", | |
aa900596 MD |
68 | .type = __type_integer(uint8_t, 9, 1, 0, |
69 | __BIG_ENDIAN, 16, none), | |
9cf9736a GB |
70 | }, |
71 | [7] = { | |
72 | .name = "window_size", | |
aa900596 MD |
73 | .type = __type_integer(uint16_t, 0, 0, 0, |
74 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
75 | }, |
76 | [8] = { | |
77 | .name = "checksum", | |
aa900596 MD |
78 | .type = __type_integer(uint16_t, 0, 0, 0, |
79 | __BIG_ENDIAN, 16, none), | |
9cf9736a GB |
80 | }, |
81 | [9] = { | |
82 | .name = "urg_ptr", | |
aa900596 MD |
83 | .type = __type_integer(uint16_t, 0, 0, 0, |
84 | __BIG_ENDIAN, 10, none), | |
9cf9736a GB |
85 | }, |
86 | }; | |
87 | ||
88 | static struct lttng_event_field transport_fields[] = { | |
89 | [0] = { | |
90 | .name = "unknown", | |
91 | .type = { | |
92 | .atype = atype_struct, | |
93 | .u._struct.nr_fields = ARRAY_SIZE(emptyfields), | |
94 | .u._struct.fields = emptyfields, | |
95 | }, | |
96 | }, | |
97 | [1] = { | |
98 | .name = "tcp", | |
99 | .type = { | |
100 | .atype = atype_struct, | |
101 | .u._struct.nr_fields = ARRAY_SIZE(tcpfields), | |
102 | .u._struct.fields = tcpfields, | |
103 | }, | |
104 | }, | |
105 | }; | |
106 | ||
107 | enum transport_header_types { | |
0910ab71 MD |
108 | TH_NONE = 0, |
109 | TH_TCP = 1, | |
9cf9736a GB |
110 | }; |
111 | ||
0910ab71 | 112 | static inline enum transport_header_types __get_transport_header_type(struct sk_buff *skb) |
9cf9736a GB |
113 | { |
114 | if (__has_network_hdr(skb)) { | |
115 | /* | |
aa900596 MD |
116 | * When both transport and network headers are set, |
117 | * transport header is greater than network header, | |
118 | * otherwise it points to head. | |
9cf9736a GB |
119 | */ |
120 | if (skb->transport_header > skb->network_header) { | |
121 | /* | |
aa900596 MD |
122 | * Get the transport protocol from the network |
123 | * header's data. This method works both for | |
124 | * sent and received packets. | |
9cf9736a GB |
125 | */ |
126 | if ((skb->protocol == htons(ETH_P_IP) && | |
127 | ip_hdr(skb)->protocol == IPPROTO_TCP) || | |
128 | (skb->protocol == htons(ETH_P_IPV6) && | |
129 | ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)) | |
130 | return TH_TCP; | |
131 | } | |
132 | /* Fallthrough for other cases where header is not TCP. */ | |
133 | } | |
134 | return TH_NONE; | |
135 | } | |
136 | ||
7299e758 MD |
137 | static struct lttng_enum_entry proto_transport_enum_entries[] = { |
138 | [0] = { | |
139 | .start = { .value = 0, .signedness = 0, }, | |
140 | .end = { .value = IPPROTO_TCP - 1, .signedness = 0, }, | |
141 | .string = "_unknown", | |
142 | }, | |
143 | [1] = { | |
144 | .start = { .value = IPPROTO_TCP, .signedness = 0, }, | |
145 | .end = { .value = IPPROTO_TCP, .signedness = 0, }, | |
146 | .string = "_tcp", | |
147 | }, | |
148 | [2] = { | |
149 | .start = { .value = IPPROTO_TCP + 1, .signedness = 0, }, | |
150 | .end = { .value = 255, .signedness = 0, }, | |
151 | .string = "_unknown", | |
152 | }, | |
153 | }; | |
154 | ||
155 | static const struct lttng_enum_desc proto_transport_header_type = { | |
156 | .name = "proto_transport_header_type", | |
157 | .entries = proto_transport_enum_entries, | |
158 | .nr_entries = ARRAY_SIZE(proto_transport_enum_entries), | |
159 | }; | |
160 | ||
9cf9736a GB |
161 | static struct lttng_enum_entry transport_enum_entries[] = { |
162 | [0] = { | |
0910ab71 MD |
163 | .start = { .value = TH_NONE, .signedness = 0, }, |
164 | .end = { .value = TH_NONE, .signedness = 0, }, | |
9cf9736a GB |
165 | .string = "_unknown", |
166 | }, | |
167 | [1] = { | |
0910ab71 MD |
168 | .start = { .value = TH_TCP, .signedness = 0, }, |
169 | .end = { .value = TH_TCP, .signedness = 0, }, | |
9cf9736a GB |
170 | .string = "_tcp", |
171 | }, | |
9cf9736a GB |
172 | }; |
173 | ||
174 | static const struct lttng_enum_desc transport_header_type = { | |
175 | .name = "transport_header_type", | |
176 | .entries = transport_enum_entries, | |
177 | .nr_entries = ARRAY_SIZE(transport_enum_entries), | |
178 | }; | |
179 | ||
e5990fd4 GB |
180 | /* Structures for network headers. */ |
181 | ||
182 | static struct lttng_event_field ipv4fields[] = { | |
183 | [0] = { | |
184 | .name = "version", | |
aa900596 MD |
185 | .type = __type_integer(uint8_t, 4, 4, 0, |
186 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
187 | }, |
188 | [1] = { | |
189 | .name = "ihl", | |
aa900596 MD |
190 | .type = __type_integer(uint8_t, 4, 4, 0, |
191 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
192 | }, |
193 | [2] = { | |
194 | .name = "tos", | |
aa900596 MD |
195 | .type = __type_integer(uint8_t, 0, 0, 0, |
196 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
197 | }, |
198 | [3] = { | |
199 | .name = "tot_len", | |
aa900596 MD |
200 | .type = __type_integer(uint16_t, 0, 0, 0, |
201 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
202 | }, |
203 | [4] = { | |
204 | .name = "id", | |
aa900596 MD |
205 | .type = __type_integer(uint16_t, 0, 0, 0, |
206 | __BIG_ENDIAN, 16, none), | |
e5990fd4 GB |
207 | }, |
208 | [5] = { | |
209 | .name = "frag_off", | |
aa900596 MD |
210 | .type = __type_integer(uint16_t, 0, 0, 0, |
211 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
212 | }, |
213 | [6] = { | |
214 | .name = "ttl", | |
aa900596 MD |
215 | .type = __type_integer(uint8_t, 0, 0, 0, |
216 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
217 | }, |
218 | [7] = { | |
219 | .name = "protocol", | |
9cf9736a GB |
220 | .type = { |
221 | .atype = atype_enum, | |
7299e758 MD |
222 | .u.basic.enumeration.desc = |
223 | &proto_transport_header_type, | |
9cf9736a GB |
224 | .u.basic.enumeration.container_type = { |
225 | .size = 8, | |
226 | .alignment = 8, | |
227 | .signedness = 0, | |
aa900596 MD |
228 | .reverse_byte_order = |
229 | __BIG_ENDIAN != __BYTE_ORDER, | |
9cf9736a GB |
230 | .base = 10, |
231 | .encoding = lttng_encode_none, | |
232 | }, | |
233 | }, | |
e5990fd4 GB |
234 | }, |
235 | [8] = { | |
236 | .name = "checksum", | |
aa900596 MD |
237 | .type = __type_integer(uint16_t, 0, 0, 0, |
238 | __BIG_ENDIAN, 16, none), | |
e5990fd4 GB |
239 | }, |
240 | [9] = { | |
241 | .name = "saddr", | |
242 | .type = { | |
243 | .atype = atype_array, | |
aa900596 MD |
244 | .u.array.elem_type = |
245 | __type_integer(uint8_t, 0, 0, 0, | |
246 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
247 | .u.array.length = 4, |
248 | .u.array.elem_alignment = lttng_alignof(uint8_t), | |
249 | }, | |
250 | }, | |
251 | [10] = { | |
252 | .name = "daddr", | |
253 | .type = { | |
254 | .atype = atype_array, | |
aa900596 MD |
255 | .u.array.elem_type = |
256 | __type_integer(uint8_t, 0, 0, 0, | |
257 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
258 | .u.array.length = 4, |
259 | .u.array.elem_alignment = lttng_alignof(uint8_t), | |
260 | }, | |
261 | }, | |
9cf9736a | 262 | [11] = { |
0910ab71 MD |
263 | .name = "transport_header_type", |
264 | .type = { | |
265 | .atype = atype_enum, | |
266 | .u.basic.enumeration.desc = &transport_header_type, | |
267 | .u.basic.enumeration.container_type = { | |
268 | .size = 8, | |
269 | .alignment = 8, | |
270 | .signedness = 0, | |
271 | .reverse_byte_order = 0, | |
272 | .base = 10, | |
273 | .encoding = lttng_encode_none, | |
274 | }, | |
275 | }, | |
276 | }, | |
277 | [12] = { | |
9cf9736a GB |
278 | .name = "transport_header", |
279 | .type = { | |
280 | .atype = atype_variant, | |
0910ab71 | 281 | .u.variant.tag_name = "transport_header_type", |
9cf9736a GB |
282 | .u.variant.choices = transport_fields, |
283 | .u.variant.nr_choices = ARRAY_SIZE(transport_fields), | |
284 | }, | |
285 | }, | |
e5990fd4 GB |
286 | }; |
287 | ||
288 | static struct lttng_event_field ipv6fields[] = { | |
289 | [0] = { | |
290 | .name = "version", | |
aa900596 MD |
291 | .type = __type_integer(uint8_t, 4, 4, 0, |
292 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
293 | }, |
294 | [1] = { | |
295 | .name = "prio", | |
aa900596 MD |
296 | .type = __type_integer(uint8_t, 4, 4, 0, |
297 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
298 | }, |
299 | [2] = { | |
300 | .name = "flow_lbl", | |
301 | .type = { | |
302 | .atype = atype_array, | |
aa900596 MD |
303 | .u.array.elem_type = |
304 | __type_integer(uint8_t, 0, 0, 0, | |
305 | __BIG_ENDIAN, 16, none), | |
e5990fd4 GB |
306 | .u.array.length = 3, |
307 | .u.array.elem_alignment = lttng_alignof(uint8_t), | |
308 | }, | |
309 | }, | |
310 | [3] = { | |
311 | .name = "payload_len", | |
aa900596 MD |
312 | .type = __type_integer(uint16_t, 0, 0, 0, |
313 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
314 | }, |
315 | [4] = { | |
316 | .name = "nexthdr", | |
9cf9736a GB |
317 | .type = { |
318 | .atype = atype_enum, | |
7299e758 MD |
319 | .u.basic.enumeration.desc = |
320 | &proto_transport_header_type, | |
9cf9736a GB |
321 | .u.basic.enumeration.container_type = { |
322 | .size = 8, | |
323 | .alignment = 8, | |
324 | .signedness = 0, | |
aa900596 MD |
325 | .reverse_byte_order = |
326 | __BIG_ENDIAN != __BYTE_ORDER, | |
9cf9736a GB |
327 | .base = 10, |
328 | .encoding = lttng_encode_none, | |
329 | }, | |
330 | }, | |
e5990fd4 GB |
331 | }, |
332 | [5] = { | |
333 | .name = "hop_limit", | |
aa900596 MD |
334 | .type = __type_integer(uint8_t, 0, 0, 0, |
335 | __BIG_ENDIAN, 10, none), | |
e5990fd4 GB |
336 | }, |
337 | [6] = { | |
338 | .name = "saddr", | |
339 | .type = { | |
340 | .atype = atype_array, | |
aa900596 MD |
341 | .u.array.elem_type = |
342 | __type_integer(uint16_t, 0, 0, 0, | |
343 | __BIG_ENDIAN, 16, none), | |
e5990fd4 GB |
344 | .u.array.length = 8, |
345 | .u.array.elem_alignment = lttng_alignof(uint16_t), | |
346 | }, | |
347 | }, | |
348 | [7] = { | |
349 | .name = "daddr", | |
350 | .type = { | |
351 | .atype = atype_array, | |
aa900596 MD |
352 | .u.array.elem_type = |
353 | __type_integer(uint16_t, 0, 0, 0, | |
354 | __BIG_ENDIAN, 16, none), | |
e5990fd4 GB |
355 | .u.array.length = 8, |
356 | .u.array.elem_alignment = lttng_alignof(uint16_t), | |
357 | }, | |
358 | }, | |
9cf9736a | 359 | [8] = { |
0910ab71 MD |
360 | .name = "transport_header_type", |
361 | .type = { | |
362 | .atype = atype_enum, | |
363 | .u.basic.enumeration.desc = &transport_header_type, | |
364 | .u.basic.enumeration.container_type = { | |
365 | .size = 8, | |
366 | .alignment = 8, | |
367 | .signedness = 0, | |
368 | .reverse_byte_order = 0, | |
369 | .base = 10, | |
370 | .encoding = lttng_encode_none, | |
371 | }, | |
372 | }, | |
373 | }, | |
374 | [9] = { | |
9cf9736a GB |
375 | .name = "transport_header", |
376 | .type = { | |
377 | .atype = atype_variant, | |
0910ab71 | 378 | .u.variant.tag_name = "transport_header_type", |
9cf9736a GB |
379 | .u.variant.choices = transport_fields, |
380 | .u.variant.nr_choices = ARRAY_SIZE(transport_fields), | |
381 | }, | |
382 | }, | |
e5990fd4 GB |
383 | }; |
384 | ||
385 | static struct lttng_event_field network_fields[] = { | |
386 | [0] = { | |
387 | .name = "unknown", | |
388 | .type = { | |
389 | .atype = atype_struct, | |
390 | .u._struct.nr_fields = 0, | |
391 | .u._struct.fields = emptyfields, | |
392 | }, | |
393 | }, | |
394 | [1] = { | |
395 | .name = "ipv4", | |
396 | .type = { | |
397 | .atype = atype_struct, | |
398 | .u._struct.nr_fields = ARRAY_SIZE(ipv4fields), | |
399 | .u._struct.fields = ipv4fields, | |
400 | }, | |
401 | }, | |
402 | [2] = { | |
403 | .name = "ipv6", | |
404 | .type = { | |
405 | .atype = atype_struct, | |
406 | .u._struct.nr_fields = ARRAY_SIZE(ipv6fields), | |
407 | .u._struct.fields = ipv6fields, | |
408 | }, | |
409 | }, | |
410 | }; | |
411 | ||
412 | enum network_header_types { | |
413 | NH_NONE, | |
414 | NH_IPV4, | |
415 | NH_IPV6, | |
416 | }; | |
417 | ||
418 | static inline unsigned char __get_network_header_type(struct sk_buff *skb) | |
419 | { | |
420 | if (__has_network_hdr(skb)) { | |
421 | if (skb->protocol == htons(ETH_P_IPV6)) | |
422 | return NH_IPV6; | |
423 | else if (skb->protocol == htons(ETH_P_IP)) | |
424 | return NH_IPV4; | |
425 | /* Fallthrough for other header types. */ | |
426 | } | |
427 | return NH_NONE; | |
428 | } | |
429 | ||
430 | #endif | |
431 | ||
432 | LTTNG_TRACEPOINT_ENUM(net_network_header, | |
433 | TP_ENUM_VALUES( | |
434 | ctf_enum_value("_unknown", NH_NONE) | |
435 | ctf_enum_value("_ipv4", NH_IPV4) | |
436 | ctf_enum_value("_ipv6", NH_IPV6) | |
437 | ) | |
438 | ) | |
b283666f | 439 | |
3bc29f0a | 440 | LTTNG_TRACEPOINT_EVENT(net_dev_xmit, |
b283666f | 441 | |
f95480cf | 442 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) |
b283666f PW |
443 | TP_PROTO(struct sk_buff *skb, |
444 | int rc, | |
445 | struct net_device *dev, | |
446 | unsigned int skb_len), | |
447 | ||
448 | TP_ARGS(skb, rc, dev, skb_len), | |
4a7363f7 PW |
449 | #else |
450 | TP_PROTO(struct sk_buff *skb, | |
451 | int rc), | |
aa900596 | 452 | |
4a7363f7 PW |
453 | TP_ARGS(skb, rc), |
454 | #endif | |
b283666f | 455 | |
f127e61e | 456 | TP_FIELDS( |
fa91fcac | 457 | ctf_integer_hex(void *, skbaddr, skb) |
f127e61e | 458 | ctf_integer(int, rc, rc) |
f95480cf | 459 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) |
974c0969 | 460 | ctf_integer(unsigned int, len, skb_len) |
f127e61e | 461 | ctf_string(name, dev->name) |
4a7363f7 | 462 | #else |
974c0969 | 463 | ctf_integer(unsigned int, len, skb->len) |
f127e61e | 464 | ctf_string(name, skb->dev->name) |
4a7363f7 | 465 | #endif |
f127e61e | 466 | ) |
b283666f PW |
467 | ) |
468 | ||
3bc29f0a | 469 | LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_template, |
b283666f PW |
470 | |
471 | TP_PROTO(struct sk_buff *skb), | |
472 | ||
473 | TP_ARGS(skb), | |
474 | ||
f127e61e | 475 | TP_FIELDS( |
fa91fcac | 476 | ctf_integer_hex(void *, skbaddr, skb) |
f127e61e MD |
477 | ctf_integer(unsigned int, len, skb->len) |
478 | ctf_string(name, skb->dev->name) | |
e5990fd4 GB |
479 | ctf_enum(net_network_header, unsigned char, |
480 | network_header_type, __get_network_header_type(skb)) | |
481 | ctf_custom_field( | |
482 | ctf_custom_type( | |
483 | .atype = atype_variant, | |
484 | .u.variant.tag_name = "network_header_type", | |
485 | .u.variant.choices = network_fields, | |
aa900596 MD |
486 | .u.variant.nr_choices = |
487 | ARRAY_SIZE(network_fields), | |
e5990fd4 GB |
488 | ), |
489 | network_header, | |
490 | ctf_custom_code( | |
0910ab71 MD |
491 | bool has_network_header = false; |
492 | ||
aa900596 | 493 | /* Copy the network header. */ |
e5990fd4 GB |
494 | switch (__get_network_header_type(skb)) { |
495 | case NH_IPV4: { | |
496 | ctf_align(uint16_t) | |
497 | ctf_array_type(uint8_t, ip_hdr(skb), | |
498 | sizeof(struct iphdr)) | |
0910ab71 | 499 | has_network_header = true; |
e5990fd4 GB |
500 | break; |
501 | } | |
502 | case NH_IPV6: { | |
503 | ctf_align(uint16_t) | |
504 | ctf_array_type(uint8_t, ipv6_hdr(skb), | |
505 | sizeof(struct ipv6hdr)) | |
0910ab71 | 506 | has_network_header = true; |
e5990fd4 GB |
507 | break; |
508 | } | |
509 | default: | |
aa900596 MD |
510 | /* |
511 | * For any other network header | |
512 | * type, there is nothing to do. | |
513 | */ | |
e5990fd4 GB |
514 | break; |
515 | } | |
9cf9736a | 516 | |
0910ab71 MD |
517 | if (has_network_header) { |
518 | enum transport_header_types th_type = | |
519 | __get_transport_header_type(skb); | |
520 | ||
521 | /* Transport header type field. */ | |
522 | ctf_integer_type(unsigned char, th_type) | |
523 | ||
524 | /* Copy the transport header. */ | |
525 | if (th_type == TH_TCP) { | |
526 | ctf_align(uint32_t) | |
527 | ctf_array_type(uint8_t, tcp_hdr(skb), | |
528 | sizeof(struct tcphdr)) | |
529 | } | |
530 | /* | |
531 | * For any other transport header type, | |
532 | * there is nothing to do. | |
533 | */ | |
9cf9736a | 534 | } |
e5990fd4 GB |
535 | ) |
536 | ) | |
f127e61e | 537 | ) |
b283666f PW |
538 | ) |
539 | ||
3bc29f0a | 540 | LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template, net_dev_queue, |
b283666f PW |
541 | |
542 | TP_PROTO(struct sk_buff *skb), | |
543 | ||
544 | TP_ARGS(skb) | |
545 | ) | |
546 | ||
b7f5408a MD |
547 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template, |
548 | ||
549 | netif_receive_skb, | |
550 | ||
551 | net_if_receive_skb, | |
b283666f PW |
552 | |
553 | TP_PROTO(struct sk_buff *skb), | |
554 | ||
555 | TP_ARGS(skb) | |
556 | ) | |
557 | ||
b7f5408a MD |
558 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template, |
559 | ||
560 | netif_rx, | |
561 | ||
562 | net_if_rx, | |
b283666f PW |
563 | |
564 | TP_PROTO(struct sk_buff *skb), | |
565 | ||
566 | TP_ARGS(skb) | |
567 | ) | |
3bc29f0a | 568 | #endif /* LTTNG_TRACE_NET_H */ |
b283666f PW |
569 | |
570 | /* This part must be outside protection */ | |
6ec43db8 | 571 | #include <probes/define_trace.h> |