@@ -46,6 +46,27 @@ TRACE_EVENT(udp_send_skb,
TP_printk("skaddr=%px, skbaddr=%px", __entry->skaddr, __entry->skbaddr)
);
+#if IS_ENABLED(CONFIG_IPV6)
+TRACE_EVENT(udp_v6_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
+
#endif /* _TRACE_UDP_H */
/* This part must be outside protection */
@@ -62,3 +62,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(napi_poll);
EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_send_reset);
EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_bad_csum);
+#if IS_ENABLED(CONFIG_IPV6)
+EXPORT_TRACEPOINT_SYMBOL_GPL(udp_v6_send_skb);
+#endif
@@ -52,6 +52,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <trace/events/skb.h>
+#include <trace/events/udp.h>
#include "udp_impl.h"
static u32 udp6_ehashfn(const struct net *net,
@@ -1255,6 +1256,7 @@ static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6,
} else {
UDP6_INC_STATS(sock_net(sk),
UDP_MIB_OUTDATAGRAMS, is_udplite);
+ trace_udp_v6_send_skb(sk, skb);
}
return err;
}