@@ -99,6 +99,24 @@ TRACE_EVENT(ip_rcv,
TP_printk("skbaddr=%px", __entry->skbaddr)
);
+#if IS_ENABLED(CONFIG_IPV6)
+TRACE_EVENT(ipv6_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_IP_H */
/* This part must be outside protection */
@@ -64,4 +64,5 @@ 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);
+EXPORT_TRACEPOINT_SYMBOL_GPL(ipv6_rcv);
#endif
@@ -44,6 +44,7 @@
#include <net/xfrm.h>
#include <net/inet_ecn.h>
#include <net/dst_metadata.h>
+#include <trace/events/ip.h>
INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *));
static void ip6_rcv_finish_core(struct net *net, struct sock *sk,
@@ -59,8 +60,10 @@ static void ip6_rcv_finish_core(struct net *net, struct sock *sk,
INDIRECT_CALL_2(edemux, tcp_v6_early_demux,
udp_v6_early_demux, skb);
}
- if (!skb_valid_dst(skb))
+ if (!skb_valid_dst(skb)) {
+ trace_ipv6_rcv(skb);
ip6_route_input(skb);
+ }
}
int ip6_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)