]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: TCP Fast Open Server - record retransmits after 3WHS
authorNeal Cardwell <ncardwell@google.com>
Sat, 22 Sep 2012 17:03:47 +0000 (17:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Sep 2012 03:15:25 +0000 (23:15 -0400)
commitef57da977af890b18332cd4fcb59311bfb801c62
tree2aeded9a3d62bec2312880332883a4b4aa9a4067
parent22005fbf67e6f89a2c3c3f0208924ac24958df76
tcp: TCP Fast Open Server - record retransmits after 3WHS

When recording the number of SYNACK retransmits for servers using TCP
Fast Open, fix the code to ensure that we copy over the retransmit
count from the request_sock after we receive the ACK that completes
the 3-way handshake.

The story here is similar to that of SYNACK RTT
measurements. Previously we were always doing this in
tcp_v4_syn_recv_sock(). However, for TCP Fast Open connections
tcp_v4_conn_req_fastopen() calls tcp_v4_syn_recv_sock() at the time we
receive the SYN. So for TFO we must copy the final SYNACK retransmit
count in tcp_rcv_state_process().

Note that copying over the SYNACK retransmit count will give us the
correct count since, as is mentioned in a comment in
tcp_retransmit_timer(), before we receive an ACK for our SYN-ACK a TFO
passive connection does not retransmit anything else (e.g., data or
FIN segments).

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c