]> git.itanic.dy.fi Git - linux-stable/commitdiff
Fix TCP slow_start_after_idle sysctl
authorDavid Miller <davem@davemloft.net>
Tue, 10 Apr 2007 20:39:35 +0000 (13:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Apr 2007 20:47:05 +0000 (13:47 -0700)
[TCP]: slow_start_after_idle should influence cwnd validation too

For the cases that slow_start_after_idle are meant to deal
with, it is almost a certainty that the congestion window
tests will think the connection is application limited and
we'll thus decrease the cwnd there too.  This defeats the
whole point of setting slow_start_after_idle to zero.

So test it there too.

We do not cancel out the entire tcp_cwnd_validate() function
so that if the sysctl is changed we still have the validation
state maintained.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp_output.c

index c99bbe2c5355e2f18d608c7516aa1a6764195a6a..340bcdda6d7a11c636c7860816b844317010881b 100644 (file)
@@ -943,7 +943,8 @@ static void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
                if (tp->packets_out > tp->snd_cwnd_used)
                        tp->snd_cwnd_used = tp->packets_out;
 
-               if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto)
+               if (sysctl_tcp_slow_start_after_idle &&
+                   (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto)
                        tcp_cwnd_application_limited(sk);
        }
 }