diff options
author | Daniele Lacamera <root@danielinux.net> | 2008-10-07 18:58:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-07 18:58:17 -0400 |
commit | 9d2c27e17b7574023b5adb5c6a50d7aaeb915543 (patch) | |
tree | 2161f26ce73fe9e38d74691e941a299cdd532df4 /net/ipv4 | |
parent | 58ec3b4db9eb5a28e3aec5f407a54e28f7039c19 (diff) |
tcp: Fix tcp_hybla zero congestion window growth with small rho and large cwnd.
Because of rounding, in certain conditions, i.e. when in congestion
avoidance state rho is smaller than 1/128 of the current cwnd, TCP
Hybla congestion control starves and the cwnd is kept constant
forever.
This patch forces an increment by one segment after #send_cwnd calls
without increments(newreno behavior).
Signed-off-by: Daniele Lacamera <root@danielinux.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_hybla.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c index bfcbd148a89d..c209e054a634 100644 --- a/net/ipv4/tcp_hybla.c +++ b/net/ipv4/tcp_hybla.c | |||
@@ -150,7 +150,11 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
150 | ca->snd_cwnd_cents -= 128; | 150 | ca->snd_cwnd_cents -= 128; |
151 | tp->snd_cwnd_cnt = 0; | 151 | tp->snd_cwnd_cnt = 0; |
152 | } | 152 | } |
153 | 153 | /* check when cwnd has not been incremented for a while */ | |
154 | if (increment == 0 && odd == 0 && tp->snd_cwnd_cnt >= tp->snd_cwnd) { | ||
155 | tp->snd_cwnd++; | ||
156 | tp->snd_cwnd_cnt = 0; | ||
157 | } | ||
154 | /* clamp down slowstart cwnd to ssthresh value. */ | 158 | /* clamp down slowstart cwnd to ssthresh value. */ |
155 | if (is_slowstart) | 159 | if (is_slowstart) |
156 | tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); | 160 | tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); |