1d0b6e04aSLi Zefan #undef TRACE_SYSTEM 2d0b6e04aSLi Zefan #define TRACE_SYSTEM skb 3d0b6e04aSLi Zefan 4ad8d75ffSSteven Rostedt #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) 5ad8d75ffSSteven Rostedt #define _TRACE_SKB_H 6ad8d75ffSSteven Rostedt 7ad8d75ffSSteven Rostedt #include <linux/skbuff.h> 8ad8d75ffSSteven Rostedt #include <linux/tracepoint.h> 9ad8d75ffSSteven Rostedt 10ad8d75ffSSteven Rostedt /* 11ad8d75ffSSteven Rostedt * Tracepoint for free an sk_buff: 12ad8d75ffSSteven Rostedt */ 13ad8d75ffSSteven Rostedt TRACE_EVENT(kfree_skb, 14ad8d75ffSSteven Rostedt 15ad8d75ffSSteven Rostedt TP_PROTO(struct sk_buff *skb, void *location), 16ad8d75ffSSteven Rostedt 17ad8d75ffSSteven Rostedt TP_ARGS(skb, location), 18ad8d75ffSSteven Rostedt 19ad8d75ffSSteven Rostedt TP_STRUCT__entry( 20ad8d75ffSSteven Rostedt __field( void *, skbaddr ) 21ad8d75ffSSteven Rostedt __field( unsigned short, protocol ) 22ad8d75ffSSteven Rostedt __field( void *, location ) 23ad8d75ffSSteven Rostedt ), 24ad8d75ffSSteven Rostedt 25ad8d75ffSSteven Rostedt TP_fast_assign( 26ad8d75ffSSteven Rostedt __entry->skbaddr = skb; 27ad8d75ffSSteven Rostedt if (skb) { 28ad8d75ffSSteven Rostedt __entry->protocol = ntohs(skb->protocol); 29ad8d75ffSSteven Rostedt } 30ad8d75ffSSteven Rostedt __entry->location = location; 31ad8d75ffSSteven Rostedt ), 32ad8d75ffSSteven Rostedt 33ad8d75ffSSteven Rostedt TP_printk("skbaddr=%p protocol=%u location=%p", 34ad8d75ffSSteven Rostedt __entry->skbaddr, __entry->protocol, __entry->location) 35ad8d75ffSSteven Rostedt ); 36ad8d75ffSSteven Rostedt 37ad8d75ffSSteven Rostedt #endif /* _TRACE_SKB_H */ 38ad8d75ffSSteven Rostedt 39ad8d75ffSSteven Rostedt /* This part must be outside protection */ 40ad8d75ffSSteven Rostedt #include <trace/define_trace.h> 41