diff options
author | Yuchung Cheng <ycheng@google.com> | 2013-09-05 18:36:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-06 14:43:49 -0400 |
commit | 16edfe7ee02dd7fcc13855ea19158333529533b2 (patch) | |
tree | b6dc03329acf17b760ed4c022e545fe97c1699b2 /net | |
parent | 5ffd5cddd4d353fe18c01b89397dcad02035bb95 (diff) |
tcp: fix no cwnd growth after timeout
In commit 0f7cc9a3 "tcp: increase throughput when reordering is high",
it only allows cwnd to increase in Open state. This mistakenly disables
slow start after timeout (CA_Loss). Moreover cwnd won't grow if the
state moves from Disorder to Open later in tcp_fastretrans_alert().
Therefore the correct logic should be to allow cwnd to grow as long
as the data is received in order in Open, Loss, or even Disorder state.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 1969e16d936d..894bc174f472 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3162,16 +3162,14 @@ static inline bool tcp_may_raise_cwnd(const struct sock *sk, const int flag) | |||
3162 | 3162 | ||
3163 | /* If reordering is high then always grow cwnd whenever data is | 3163 | /* If reordering is high then always grow cwnd whenever data is |
3164 | * delivered regardless of its ordering. Otherwise stay conservative | 3164 | * delivered regardless of its ordering. Otherwise stay conservative |
3165 | * and only grow cwnd on in-order delivery in Open state, and retain | 3165 | * and only grow cwnd on in-order delivery (RFC5681). A stretched ACK w/ |
3166 | * cwnd in Disordered state (RFC5681). A stretched ACK with | ||
3167 | * new SACK or ECE mark may first advance cwnd here and later reduce | 3166 | * new SACK or ECE mark may first advance cwnd here and later reduce |
3168 | * cwnd in tcp_fastretrans_alert() based on more states. | 3167 | * cwnd in tcp_fastretrans_alert() based on more states. |
3169 | */ | 3168 | */ |
3170 | if (tcp_sk(sk)->reordering > sysctl_tcp_reordering) | 3169 | if (tcp_sk(sk)->reordering > sysctl_tcp_reordering) |
3171 | return flag & FLAG_FORWARD_PROGRESS; | 3170 | return flag & FLAG_FORWARD_PROGRESS; |
3172 | 3171 | ||
3173 | return inet_csk(sk)->icsk_ca_state == TCP_CA_Open && | 3172 | return flag & FLAG_DATA_ACKED; |
3174 | flag & FLAG_DATA_ACKED; | ||
3175 | } | 3173 | } |
3176 | 3174 | ||
3177 | /* Check that window update is acceptable. | 3175 | /* Check that window update is acceptable. |