@@ -27,6 +27,23 @@ TRACE_EVENT(udp_fail_queue_rcv_skb,
TP_printk("rc=%d port=%hu", __entry->rc, __entry->lport)
);
+TRACE_EVENT(udp_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)
+);
+
TRACE_EVENT(udp_send_skb,
TP_PROTO(const struct sock *sk, const struct sk_buff *skb),
@@ -2617,7 +2617,13 @@ int udp_v4_early_demux(struct sk_buff *skb)
int udp_rcv(struct sk_buff *skb)
{
- return __udp4_lib_rcv(skb, &udp_table, IPPROTO_UDP);
+ int ret;
+
+ ret = __udp4_lib_rcv(skb, &udp_table, IPPROTO_UDP);
+ if (!ret)
+ trace_udp_rcv(skb);
+ return ret;
+
}
void udp_destroy_sock(struct sock *sk)