public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [TCP]: Fixes IW > 2 cases when TCP is application limited
@ 2006-08-03 21:32 Ilpo  Järvinen
  2006-08-04  1:45 ` Stephen Hemminger
  2006-08-04 23:57 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Ilpo  Järvinen @ 2006-08-03 21:32 UTC (permalink / raw)
  To: netdev; +Cc: Ilpo  Järvinen

Whenever a transfer is application limited, we are allowed at least
initial window worth of data per window unless cwnd is previously
less than that.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 net/ipv4/tcp_input.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 738dad9..104af5d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3541,7 +3541,8 @@ void tcp_cwnd_application_limited(struct
 	if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open &&
 	    sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) {
 		/* Limited by application or receiver window. */
-		u32 win_used = max(tp->snd_cwnd_used, 2U);
+		u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk));
+		u32 win_used = max(tp->snd_cwnd_used, init_win);
 		if (win_used < tp->snd_cwnd) {
 			tp->snd_ssthresh = tcp_current_ssthresh(sk);
 			tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1;
-- 
1.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-04 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 21:32 [PATCH] [TCP]: Fixes IW > 2 cases when TCP is application limited Ilpo  Järvinen
2006-08-04  1:45 ` Stephen Hemminger
2006-08-04 23:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox