From: Hoang Tran Date: Wed, 27 Sep 2017 16:30:58 +0000 (+0200) Subject: tcp: fix under-evaluated ssthresh in TCP Vegas X-Git-Tag: v5.15~9988^2~606 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf5d74b85ef40c202c76d90959db4d850f301b95;p=platform%2Fkernel%2Flinux-starfive.git tcp: fix under-evaluated ssthresh in TCP Vegas 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 218cfcc..ee113ff 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)