+/* SPDX-License-Identifier: GPL-2.0-only */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM skb
#if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
#define LTTNG_TRACE_SKB_H
-#include "../../../probes/lttng-tracepoint-event.h"
+#include <probes/lttng-tracepoint-event.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/version.h>
TP_ARGS(skb, location),
- TP_STRUCT__entry(
- __field( void *, skbaddr )
- __field( void *, location )
- __field( unsigned short, protocol )
- ),
-
- TP_fast_assign(
- tp_assign(skbaddr, skb)
- tp_assign(location, location)
- tp_assign(protocol, ntohs(skb->protocol))
- ),
-
- TP_printk("skbaddr=%p protocol=%u location=%p",
- __entry->skbaddr, __entry->protocol, __entry->location)
+ TP_FIELDS(
+ ctf_integer_hex(void *, skbaddr, skb)
+ ctf_integer_hex(void *, location, location)
+ ctf_integer_network(unsigned short, protocol, skb->protocol)
+ )
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
skb_consume,
TP_ARGS(skb),
- TP_STRUCT__entry(
- __field( void *, skbaddr )
- ),
-
- TP_fast_assign(
- tp_assign(skbaddr, skb)
- ),
-
- TP_printk("skbaddr=%p", __entry->skbaddr)
+ TP_FIELDS(
+ ctf_integer_hex(void *, skbaddr, skb)
+ )
)
-#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
TP_PROTO(const struct sk_buff *skb, int len),
TP_ARGS(skb, len),
- TP_STRUCT__entry(
- __field( const void *, skbaddr )
- __field( int, len )
- ),
-
- TP_fast_assign(
- tp_assign(skbaddr, skb)
- tp_assign(len, len)
- ),
-
- TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
+ TP_FIELDS(
+ ctf_integer_hex(const void *, skbaddr, skb)
+ ctf_integer(int, len, len)
+ )
)
-#endif
#endif /* LTTNG_TRACE_SKB_H */
/* This part must be outside protection */
-#include "../../../probes/define_trace.h"
+#include <probes/define_trace.h>