summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Leith <doug.leith@nuim.ie>2008-12-05 02:17:18 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-05 02:17:18 +0100
commita6af2d6ba5797c556fba0cd3a19e5f3bc9a99b76 (patch)
treedd2a3be62a935df9c8f8d0a0845ddd310d774f6c
parentcan: omit received RTR frames for single ID filter lists (diff)
downloadlinux-a6af2d6ba5797c556fba0cd3a19e5f3bc9a99b76.tar.xz
linux-a6af2d6ba5797c556fba0cd3a19e5f3bc9a99b76.zip
tcp: tcp_vegas ssthresh bug fix
This patch fixes a bug in tcp_vegas.c. At the moment this code leaves ssthresh untouched. However, this means that the vegas congestion control algorithm is effectively unable to reduce cwnd below the ssthresh value (if the vegas update lowers the cwnd below ssthresh, then slow start is activated to raise it back up). One example where this matters is when during slow start cwnd overshoots the link capacity and a flow then exits slow start with ssthresh set to a value above where congestion avoidance would like to adjust it. Signed-off-by: Doug Leith <doug.leith@nuim.ie> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/tcp_vegas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 14504dada116..7cd22262de3a 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -326,6 +326,8 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
tp->snd_cwnd = 2;
else if (tp->snd_cwnd > tp->snd_cwnd_clamp)
tp->snd_cwnd = tp->snd_cwnd_clamp;
+
+ tp->snd_ssthresh = tcp_current_ssthresh(sk);
}
/* Wipe the slate clean for the next RTT. */