diff options
author | Yuchung Cheng <ycheng@google.com> | 2015-07-09 23:16:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-10 00:22:52 +0300 |
commit | 071d5080e33d6f24139e4213c2d9f97a2c21b602 (patch) | |
tree | 2dad35b407a5aef707769358a0cc61c43abf33fa /net/ipv4/tcp_metrics.c | |
parent | 1007f59dce53a22cba164f854d7bdc171c85dc79 (diff) | |
download | linux-071d5080e33d6f24139e4213c2d9f97a2c21b602.tar.xz |
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_metrics.c')
-rw-r--r-- | net/ipv4/tcp_metrics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index a51d63a43e33..b3d64f61d922 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c @@ -461,7 +461,7 @@ void tcp_update_metrics(struct sock *sk) tcp_metric_set(tm, TCP_METRIC_CWND, tp->snd_cwnd); } - } else if (tp->snd_cwnd > tp->snd_ssthresh && + } else if (!tcp_in_slow_start(tp) && icsk->icsk_ca_state == TCP_CA_Open) { /* Cong. avoidance phase, cwnd is reliable. */ if (!tcp_metric_locked(tm, TCP_METRIC_SSTHRESH)) |