diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 00:24:21 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 00:24:21 -0500 |
| commit | 79ffeeb9e66da8c60de8c8ab676658bcbc47c1f7 (patch) | |
| tree | f3c3841e1d4b5c7cd3695fe34ff23e0be08d7dac /net/ipv4/tcp_htcp.c | |
| parent | a5aac37f1cdbbd1e587fc618e778ddae124e5ac3 (diff) | |
| parent | 6a438bbe68c7013a42d9c5aee5a40d7dafdbe6ec (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/tcp_htcp.c')
| -rw-r--r-- | net/ipv4/tcp_htcp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index e47b37984e95..3284cfb993e6 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
| @@ -207,14 +207,13 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | |||
| 207 | struct tcp_sock *tp = tcp_sk(sk); | 207 | struct tcp_sock *tp = tcp_sk(sk); |
| 208 | struct htcp *ca = inet_csk_ca(sk); | 208 | struct htcp *ca = inet_csk_ca(sk); |
| 209 | 209 | ||
| 210 | if (in_flight < tp->snd_cwnd) | 210 | if (!tcp_is_cwnd_limited(sk, in_flight)) |
| 211 | return; | 211 | return; |
| 212 | 212 | ||
| 213 | if (tp->snd_cwnd <= tp->snd_ssthresh) { | 213 | if (tp->snd_cwnd <= tp->snd_ssthresh) |
| 214 | /* In "safe" area, increase. */ | 214 | tcp_slow_start(tp); |
| 215 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) | 215 | else { |
| 216 | tp->snd_cwnd++; | 216 | |
| 217 | } else { | ||
| 218 | measure_rtt(sk); | 217 | measure_rtt(sk); |
| 219 | 218 | ||
| 220 | /* keep track of number of round-trip times since last backoff event */ | 219 | /* keep track of number of round-trip times since last backoff event */ |
| @@ -224,7 +223,7 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, | |||
| 224 | htcp_alpha_update(ca); | 223 | htcp_alpha_update(ca); |
| 225 | } | 224 | } |
| 226 | 225 | ||
| 227 | /* In dangerous area, increase slowly. | 226 | /* In dangerous area, increase slowly. |
| 228 | * In theory this is tp->snd_cwnd += alpha / tp->snd_cwnd | 227 | * In theory this is tp->snd_cwnd += alpha / tp->snd_cwnd |
| 229 | */ | 228 | */ |
| 230 | if ((tp->snd_cwnd_cnt++ * ca->alpha)>>7 >= tp->snd_cwnd) { | 229 | if ((tp->snd_cwnd_cnt++ * ca->alpha)>>7 >= tp->snd_cwnd) { |
