summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoang Tran <tranviethoang.vn@gmail.com>2017-09-27 18:30:58 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-25 14:22:15 +0100
commit1e52ede8e1ed95aec3cd3acaea48066cb34c238b (patch)
tree28eef6bc5bf1e7433615564c1bbd55dbb4a708d4
parentab8e096eed2f2a98e5200672720d5d46db50c80b (diff)
tcp: fix under-evaluated ssthresh in TCP Vegas
[ Upstream commit cf5d74b85ef40c202c76d90959db4d850f301b95 ] With the commit 76174004a0f19785 (tcp: do not slow start when cwnd equals ssthresh), the comparison to the reduced cwnd in tcp_vegas_ssthresh() would under-evaluate the ssthresh. Signed-off-by: Hoang Tran <hoang.tran@uclouvain.be> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ipv4/tcp_vegas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 13951c4087d4..b9fac0522be6 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -158,7 +158,7 @@ EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event);
static inline u32 tcp_vegas_ssthresh(struct tcp_sock *tp)
{
- return min(tp->snd_ssthresh, tp->snd_cwnd-1);
+ return min(tp->snd_ssthresh, tp->snd_cwnd);
}
static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)