summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_htcp.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2015-07-09 13:16:29 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-09 14:22:52 -0700
commit071d5080e33d6f24139e4213c2d9f97a2c21b602 (patch)
tree2dad35b407a5aef707769358a0cc61c43abf33fa /net/ipv4/tcp_htcp.c
parent1007f59dce53a22cba164f854d7bdc171c85dc79 (diff)
downloadlinux-071d5080e33d6f24139e4213c2d9f97a2c21b602.tar.bz2
tcp: add tcp_in_slow_start helper
Add a helper to test the slow start condition in various congestion control modules and other places. This is to prepare a slight improvement in policy as to exactly when to slow start. 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_htcp.c')
-rw-r--r--net/ipv4/tcp_htcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index 58469fff6c18..82f0d9ed60f5 100644
--- a/net/ipv4/tcp_htcp.c
+++ b/net/ipv4/tcp_htcp.c
@@ -236,7 +236,7 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
if (!tcp_is_cwnd_limited(sk))
return;
- if (tp->snd_cwnd <= tp->snd_ssthresh)
+ if (tcp_in_slow_start(tp))
tcp_slow_start(tp, acked);
else {
/* In dangerous area, increase slowly.