diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 23:39:35 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 23:39:35 -0500 |
commit | f4256e301d9800b1e0276404cb01b3ac85b51067 (patch) | |
tree | 975f56627b78f757608b31684311a24ca1478481 /net/ipv4/tcp_scalable.c | |
parent | fb2a26b9f8f5eda6b96ba9753edf105e5999d6d9 (diff) | |
parent | cd52d1ee9a92587b242d946a2300a3245d3b885a (diff) |
Merge branch 'master'
Diffstat (limited to 'net/ipv4/tcp_scalable.c')
-rw-r--r-- | net/ipv4/tcp_scalable.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c index 327770bf552..26d7486ee50 100644 --- a/net/ipv4/tcp_scalable.c +++ b/net/ipv4/tcp_scalable.c @@ -20,20 +20,20 @@ static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, int flag) { struct tcp_sock *tp = tcp_sk(sk); - if (in_flight < tp->snd_cwnd) + + if (!tcp_is_cwnd_limited(sk, in_flight)) return; - if (tp->snd_cwnd <= tp->snd_ssthresh) { - tp->snd_cwnd++; - } else { + if (tp->snd_cwnd <= tp->snd_ssthresh) + tcp_slow_start(tp); + else { tp->snd_cwnd_cnt++; if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){ - tp->snd_cwnd++; + if (tp->snd_cwnd < tp->snd_cwnd_clamp) + tp->snd_cwnd++; tp->snd_cwnd_cnt = 0; } } - tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp); - tp->snd_cwnd_stamp = tcp_time_stamp; } static u32 tcp_scalable_ssthresh(struct sock *sk) |