diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-04-09 16:23:14 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-09 16:31:15 -0400 |
commit | 15d33c070ddde99f7368e6b17b71d22c866f97d9 (patch) | |
tree | 00e779b01fb3c48e61b3ccc4de8f082e1b929cc4 | |
parent | 699784b7614ce61b16a075445b8e5b6c379c5086 (diff) |
[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>
-rw-r--r-- | net/ipv4/tcp_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 688b95594f2e..3c24881f2a65 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -943,7 +943,8 @@ static void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp) | |||
943 | if (tp->packets_out > tp->snd_cwnd_used) | 943 | if (tp->packets_out > tp->snd_cwnd_used) |
944 | tp->snd_cwnd_used = tp->packets_out; | 944 | tp->snd_cwnd_used = tp->packets_out; |
945 | 945 | ||
946 | if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) | 946 | if (sysctl_tcp_slow_start_after_idle && |
947 | (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) | ||
947 | tcp_cwnd_application_limited(sk); | 948 | tcp_cwnd_application_limited(sk); |
948 | } | 949 | } |
949 | } | 950 | } |