aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeal Cardwell <ncardwell@google.com>2015-01-28 20:01:37 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-29 01:18:38 -0500
commitc22bdca94782f05b9337d8548bde51b2f38ef17f (patch)
treeb1314e9e5322836bd46740b40d59c34c9782ef31 /net
parent814d488c61260521b1b3cc97063700a5a6667c8f (diff)
tcp: fix stretch ACK bugs in Reno
Change Reno to properly handle stretch ACKs in additive increase mode by passing in the count of ACKed packets to tcp_cong_avoid_ai(). In addition, if snd_cwnd crosses snd_ssthresh during slow start processing, and we then exit slow start mode, we need to carry over any remaining "credit" for packets ACKed and apply that to additive increase by passing this remaining "acked" count to tcp_cong_avoid_ai(). Reported-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_cong.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index faaee5338bea..8670e68e2ce6 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -335,11 +335,13 @@ void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked)
335 return; 335 return;
336 336
337 /* In "safe" area, increase. */ 337 /* In "safe" area, increase. */
338 if (tp->snd_cwnd <= tp->snd_ssthresh) 338 if (tp->snd_cwnd <= tp->snd_ssthresh) {
339 tcp_slow_start(tp, acked); 339 acked = tcp_slow_start(tp, acked);
340 if (!acked)
341 return;
342 }
340 /* In dangerous area, increase slowly. */ 343 /* In dangerous area, increase slowly. */
341 else 344 tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked);
342 tcp_cong_avoid_ai(tp, tp->snd_cwnd, 1);
343} 345}
344EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid); 346EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid);
345 347