@@ -27,6 +27,25 @@ TRACE_EVENT(udp_fail_queue_rcv_skb,
TP_printk("rc=%d port=%hu", __entry->rc, __entry->lport)
);
+TRACE_EVENT(udp_send_skb,
+
+ TP_PROTO(const struct sock *sk, const struct sk_buff *skb),
+
+ TP_ARGS(sk, skb),
+
+ TP_STRUCT__entry(
+ __field(const void *, skaddr)
+ __field(const void *, skbaddr)
+ ),
+
+ TP_fast_assign(
+ __entry->skaddr = sk;
+ __entry->skbaddr = skb;
+ ),
+
+ TP_printk("skaddr=%px, skbaddr=%px", __entry->skaddr, __entry->skbaddr)
+);
+
#endif /* _TRACE_UDP_H */
/* This part must be outside protection */
@@ -970,9 +970,11 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4,
UDP_MIB_SNDBUFERRORS, is_udplite);
err = 0;
}
- } else
+ } else {
UDP_INC_STATS(sock_net(sk),
UDP_MIB_OUTDATAGRAMS, is_udplite);
+ trace_udp_send_skb(sk, skb);
+ }
return err;
}