summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_metrics.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-07-10 00:22:53 +0300
committerDavid S. Miller <davem@davemloft.net>2015-07-10 00:22:53 +0300
commit986ca37eaedc9bc3045a91cc32e6e7427bd87b5d (patch)
treedb19bf4b5ef34ff71a94b9b50ac58875734fedd1 /net/ipv4/tcp_metrics.c
parent1007f59dce53a22cba164f854d7bdc171c85dc79 (diff)
parentb20a3fa30a281b52b2576b509efbe5cd47a5a79b (diff)
downloadlinux-986ca37eaedc9bc3045a91cc32e6e7427bd87b5d.tar.xz
Merge branch 'tcp-in-slow-start'
Yuchung Cheng says: ==================== tcp: fixes some congestion control corner cases This patch series fixes corner cases of TCP congestion control. First issue is to avoid continuing slow start when cwnd reaches ssthresh. Second issue is incorrectly processing order of congestion state and cwnd update when entering fast recovery or undoing cwnd. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r--net/ipv4/tcp_metrics.c2
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))