@@ -82,6 +82,23 @@ TRACE_EVENT(udp_v6_send_skb,
TP_printk("skaddr=%px, skbaddr=%px", __entry->skaddr, __entry->skbaddr)
);
+
+TRACE_EVENT(udpv6_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
#endif /* _TRACE_UDP_H */
@@ -65,4 +65,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_bad_csum);
#if IS_ENABLED(CONFIG_IPV6)
EXPORT_TRACEPOINT_SYMBOL_GPL(udp_v6_send_skb);
EXPORT_TRACEPOINT_SYMBOL_GPL(ipv6_rcv);
+EXPORT_TRACEPOINT_SYMBOL_GPL(udpv6_rcv);
#endif
@@ -1085,7 +1085,12 @@ INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
{
- return __udp6_lib_rcv(skb, &udp_table, IPPROTO_UDP);
+ int ret;
+
+ ret = __udp6_lib_rcv(skb, &udp_table, IPPROTO_UDP);
+ if (!ret)
+ trace_udpv6_rcv(skb);
+ return ret;
}
/*