diff options
author | Yuchung Cheng <ycheng@google.com> | 2015-07-09 13:16:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-09 14:22:52 -0700 |
commit | 76174004a0f19785a328f40388e87e982bbf69b9 (patch) | |
tree | 113a691ab55819f20b367cdeb8ba86440aa62177 /net/ipv4/tcp_cong.c | |
parent | 071d5080e33d6f24139e4213c2d9f97a2c21b602 (diff) | |
download | talos-obmc-linux-76174004a0f19785a328f40388e87e982bbf69b9.tar.gz talos-obmc-linux-76174004a0f19785a328f40388e87e982bbf69b9.zip |
tcp: do not slow start when cwnd equals ssthresh
In the original design slow start is only used to raise cwnd
when cwnd is stricly below ssthresh. It makes little sense
to slow start when cwnd == ssthresh: especially
when hystart has set ssthresh in the initial ramp, or after
recovery when cwnd resets to ssthresh. Not doing so will
also help reduce the buffer bloat slightly.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r-- | net/ipv4/tcp_cong.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 654729a8cb23..a2ed23c595cf 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -365,10 +365,8 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) */ u32 tcp_slow_start(struct tcp_sock *tp, u32 acked) { - u32 cwnd = tp->snd_cwnd + acked; + u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); - if (cwnd > tp->snd_ssthresh) - cwnd = tp->snd_ssthresh + 1; acked -= cwnd - tp->snd_cwnd; tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); |