@@ -83,6 +83,22 @@ TRACE_EVENT(ip_queue_xmit,
__entry->saddr_v6, __entry->daddr_v6, __entry->skbaddr)
);
+TRACE_EVENT(ip_rcv,
+ TP_PROTO(const struct sk_buff *skb),
+
+ TP_ARGS(skb),
+
+ TP_STRUCT__entry(
+ __field(const void *, skbaddr)
+ ),
+
+ TP_fast_assign(
+ __entry->skbaddr = skb;
+ ),
+
+ TP_printk("skbaddr=%px", __entry->skbaddr)
+);
+
#endif /* _TRACE_IP_H */
/* This part must be outside protection */
@@ -141,6 +141,7 @@
#include <linux/mroute.h>
#include <linux/netlink.h>
#include <net/dst_metadata.h>
+#include <trace/events/ip.h>
/*
* Process Router Attention IP option (RFC 2113)
@@ -400,6 +401,7 @@ static int ip_rcv_finish_core(struct net *net, struct sock *sk,
goto drop;
}
+ trace_ip_rcv(skb);
return NET_RX_SUCCESS;
drop: