| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM skb |
| 4 | |
| 5 | #if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define LTTNG_TRACE_SKB_H |
| 7 | |
| 8 | #include <probes/lttng-tracepoint-event.h> |
| 9 | #include <linux/skbuff.h> |
| 10 | #include <linux/netdevice.h> |
| 11 | |
| 12 | /* |
| 13 | * Tracepoint for free an sk_buff: |
| 14 | */ |
| 15 | LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb, |
| 16 | |
| 17 | skb_kfree, |
| 18 | |
| 19 | TP_PROTO(struct sk_buff *skb, void *location), |
| 20 | |
| 21 | TP_ARGS(skb, location), |
| 22 | |
| 23 | TP_FIELDS( |
| 24 | ctf_integer_hex(void *, skbaddr, skb) |
| 25 | ctf_integer_hex(void *, location, location) |
| 26 | ctf_integer_network(unsigned short, protocol, skb->protocol) |
| 27 | ) |
| 28 | ) |
| 29 | |
| 30 | LTTNG_TRACEPOINT_EVENT_MAP(consume_skb, |
| 31 | |
| 32 | skb_consume, |
| 33 | |
| 34 | TP_PROTO(struct sk_buff *skb), |
| 35 | |
| 36 | TP_ARGS(skb), |
| 37 | |
| 38 | TP_FIELDS( |
| 39 | ctf_integer_hex(void *, skbaddr, skb) |
| 40 | ) |
| 41 | ) |
| 42 | |
| 43 | LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec, |
| 44 | |
| 45 | TP_PROTO(const struct sk_buff *skb, int len), |
| 46 | |
| 47 | TP_ARGS(skb, len), |
| 48 | |
| 49 | TP_FIELDS( |
| 50 | ctf_integer_hex(const void *, skbaddr, skb) |
| 51 | ctf_integer(int, len, len) |
| 52 | ) |
| 53 | ) |
| 54 | |
| 55 | #endif /* LTTNG_TRACE_SKB_H */ |
| 56 | |
| 57 | /* This part must be outside protection */ |
| 58 | #include <probes/define_trace.h> |