@@ -116,6 +116,15 @@ DEFINE_EVENT(tcp_event_sk_skb, tcp_v4_rcv,
TP_ARGS(sk, skb)
);
+#if IS_ENABLED(CONFIG_IPV6)
+DEFINE_EVENT(tcp_event_sk_skb, tcp_v6_rcv,
+
+ TP_PROTO(const struct sock *sk, const struct sk_buff *skb),
+
+ TP_ARGS(sk, skb)
+);
+#endif
+
/*
* skb of trace_tcp_send_reset is the skb that caused RST. In case of
* active reset, skb should be NULL
@@ -66,4 +66,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_bad_csum);
EXPORT_TRACEPOINT_SYMBOL_GPL(udp_v6_send_skb);
EXPORT_TRACEPOINT_SYMBOL_GPL(ipv6_rcv);
EXPORT_TRACEPOINT_SYMBOL_GPL(udpv6_rcv);
+EXPORT_TRACEPOINT_SYMBOL_GPL(tcp_v6_rcv);
#endif
@@ -1765,6 +1765,9 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
bh_unlock_sock(sk);
if (skb_to_free)
__kfree_skb(skb_to_free);
+ if (!ret)
+ trace_tcp_v6_rcv(sk, skb);
+
put_and_return:
if (refcounted)
sock_put(sk);