xref: /openbmc/linux/include/trace/events/qdisc.h (revision cce8ccca)
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM qdisc
3 
4 #if !defined(_TRACE_QDISC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_QDISC_H
6 
7 #include <linux/skbuff.h>
8 #include <linux/netdevice.h>
9 #include <linux/tracepoint.h>
10 #include <linux/ftrace.h>
11 
12 TRACE_EVENT(qdisc_dequeue,
13 
14 	TP_PROTO(struct Qdisc *qdisc, const struct netdev_queue *txq,
15 		 int packets, struct sk_buff *skb),
16 
17 	TP_ARGS(qdisc, txq, packets, skb),
18 
19 	TP_STRUCT__entry(
20 		__field(	struct Qdisc *,		qdisc	)
21 		__field(const	struct netdev_queue *,	txq	)
22 		__field(	int,			packets	)
23 		__field(	void *,			skbaddr	)
24 		__field(	int,			ifindex	)
25 		__field(	u32,			handle	)
26 		__field(	u32,			parent	)
27 		__field(	unsigned long,		txq_state)
28 	),
29 
30 	/* skb==NULL indicate packets dequeued was 0, even when packets==1 */
31 	TP_fast_assign(
32 		__entry->qdisc		= qdisc;
33 		__entry->txq		= txq;
34 		__entry->packets	= skb ? packets : 0;
35 		__entry->skbaddr	= skb;
36 		__entry->ifindex	= txq->dev ? txq->dev->ifindex : 0;
37 		__entry->handle		= qdisc->handle;
38 		__entry->parent		= qdisc->parent;
39 		__entry->txq_state	= txq->state;
40 	),
41 
42 	TP_printk("dequeue ifindex=%d qdisc handle=0x%X parent=0x%X txq_state=0x%lX packets=%d skbaddr=%p",
43 		  __entry->ifindex, __entry->handle, __entry->parent,
44 		  __entry->txq_state, __entry->packets, __entry->skbaddr )
45 );
46 
47 #endif /* _TRACE_QDISC_H */
48 
49 /* This part must be outside protection */
50 #include <trace/define_trace.h>
51