tcp: properly send new data in fast recovery in first RTT
authorYuchung Cheng <ycheng@google.com>
Tue, 11 Jun 2013 22:35:32 +0000 (15:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Jun 2013 09:46:29 +0000 (02:46 -0700)
commit85f16525a2eb66e6092cbd8dcf42371df8334ed0
treeadaf85853246f46fc00f9ed4235059650acf7517
parent8e994402ad5e6ae3d391c0935f9f1dc2eeb92a5e
tcp: properly send new data in fast recovery in first RTT

Linux sends new unset data during disorder and recovery state if all
(suspected) lost packets have been retransmitted ( RFC5681, section
3.2 step 1 & 2, RFC3517 section 4, NexSeg() Rule 2).  One requirement
is to keep the receive window about twice the estimated sender's
congestion window (tcp_rcv_space_adjust()), assuming the fast
retransmits repair the losses in the next round trip.

But currently it's not the case on the first round trip in either
normal or Fast Open connection, beucase the initial receive window
is identical to (expected) sender's initial congestion window. The
fix is to double it.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c