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