2010-08-23 03:45:02 -06:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM net
|
|
|
|
|
|
|
|
#if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_NET_H
|
|
|
|
|
|
|
|
#include <linux/skbuff.h>
|
|
|
|
#include <linux/netdevice.h>
|
|
|
|
#include <linux/ip.h>
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
|
|
|
TRACE_EVENT(net_dev_xmit,
|
|
|
|
|
|
|
|
TP_PROTO(struct sk_buff *skb,
|
2011-05-30 15:48:34 -06:00
|
|
|
int rc,
|
|
|
|
struct net_device *dev,
|
|
|
|
unsigned int skb_len),
|
2010-08-23 03:45:02 -06:00
|
|
|
|
2011-05-30 15:48:34 -06:00
|
|
|
TP_ARGS(skb, rc, dev, skb_len),
|
2010-08-23 03:45:02 -06:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( void *, skbaddr )
|
|
|
|
__field( unsigned int, len )
|
|
|
|
__field( int, rc )
|
2011-05-30 15:48:34 -06:00
|
|
|
__string( name, dev->name )
|
2010-08-23 03:45:02 -06:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->skbaddr = skb;
|
2011-05-30 15:48:34 -06:00
|
|
|
__entry->len = skb_len;
|
2010-08-23 03:45:02 -06:00
|
|
|
__entry->rc = rc;
|
2011-05-30 15:48:34 -06:00
|
|
|
__assign_str(name, dev->name);
|
2010-08-23 03:45:02 -06:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
|
|
|
|
__get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(net_dev_template,
|
|
|
|
|
|
|
|
TP_PROTO(struct sk_buff *skb),
|
|
|
|
|
|
|
|
TP_ARGS(skb),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field( void *, skbaddr )
|
|
|
|
__field( unsigned int, len )
|
|
|
|
__string( name, skb->dev->name )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->skbaddr = skb;
|
|
|
|
__entry->len = skb->len;
|
|
|
|
__assign_str(name, skb->dev->name);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev=%s skbaddr=%p len=%u",
|
|
|
|
__get_str(name), __entry->skbaddr, __entry->len)
|
|
|
|
)
|
|
|
|
|
|
|
|
DEFINE_EVENT(net_dev_template, net_dev_queue,
|
|
|
|
|
|
|
|
TP_PROTO(struct sk_buff *skb),
|
|
|
|
|
|
|
|
TP_ARGS(skb)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(net_dev_template, netif_receive_skb,
|
|
|
|
|
|
|
|
TP_PROTO(struct sk_buff *skb),
|
|
|
|
|
|
|
|
TP_ARGS(skb)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(net_dev_template, netif_rx,
|
|
|
|
|
|
|
|
TP_PROTO(struct sk_buff *skb),
|
|
|
|
|
|
|
|
TP_ARGS(skb)
|
|
|
|
);
|
|
|
|
#endif /* _TRACE_NET_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|