]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: add tracepoint trace_tcp_retransmit_synack()
authorSong Liu <songliubraving@fb.com>
Mon, 30 Oct 2017 21:41:35 +0000 (14:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Nov 2017 01:12:45 +0000 (10:12 +0900)
commita7d4b30774fedc934b307707e4084ad4b9b1b0ad
tree621b3473cdd11c8a66a8c0c4819cad3974c32896
parent6a5255d21e031118586507b8d58d8808d38a3620
tcp: add tracepoint trace_tcp_retransmit_synack()

This tracepoint can be used to trace synack retransmits. It maintains
pointer to struct request_sock.

We cannot simply reuse trace_tcp_retransmit_skb() here, because the
sk here is the LISTEN socket. The IP addresses and ports should be
extracted from struct request_sock.

Note that, like many other tracepoints, this patch uses IS_ENABLED
in TP_fast_assign macro, which triggers sparse warning like:

./include/trace/events/tcp.h:274:1: error: directive in argument list
./include/trace/events/tcp.h:281:1: error: directive in argument list

However, there is no good solution to avoid these warnings. To the
best of our knowledge, these warnings are harmless.

Signed-off-by: Song Liu <songliubraving@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/tcp.h
net/ipv4/tcp_output.c