summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-12-29 11:45:51 +0900
committerDavid S. Miller <davem@davemloft.net>2018-01-02 14:27:29 -0500
commitc3fde1bd28f7c720d7bc587e85e54706df4f8163 (patch)
tree88de466d3c6836c14ed99be75d4cc49249540d43 /net/ipv4
parent4e3b95f1983b2d39dd27349d83ffc520aab3516d (diff)
downloadlinux-c3fde1bd28f7c720d7bc587e85e54706df4f8163.tar.gz
linux-c3fde1bd28f7c720d7bc587e85e54706df4f8163.tar.bz2
linux-c3fde1bd28f7c720d7bc587e85e54706df4f8163.zip
net: tcp: Add trace events for TCP congestion window tracing
This adds an event to trace TCP stat variables with slightly intrusive trace-event. This uses ftrace/perf event log buffer to trace those state, no needs to prepare own ring-buffer, nor custom user apps. User can use ftrace to trace this event as below; # cd /sys/kernel/debug/tracing # echo 1 > events/tcp/tcp_probe/enable (run workloads) # cat trace Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 4d55c4b338ee..ff71b18d9682 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5299,6 +5299,9 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
unsigned int len = skb->len;
struct tcp_sock *tp = tcp_sk(sk);
+ /* TCP congestion window tracking */
+ trace_tcp_probe(sk, skb);
+
tcp_mstamp_refresh(tp);
if (unlikely(!sk->sk_rx_dst))
inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb);