lkml.org 
[lkml]   [1996]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectTCP RTO timeout calculation error [with fix]
Date
From

I mentioned earlier that I was noticing that the initial timeout
for retransmission in TCP seemed to be too small. The following patch
fixes the problem.

Quoting from RFC1122:

> The following values SHOULD be used to initialize the
> estimation parameters for a new connection:
>
> (a) RTT = 0 seconds.
>
> (b) RTO = 3 seconds. (The smoothed variance is to be
> initialized to the value that will result in this RTO).

The last bit is the important bit, we just forgot to set the
variance value (mdev) to the correct initial value.
With this patch, plus the one I sent in earlier today for
fast retransmits, I see 1.5Kbps outgoing transfer rates consistently
across a 14.4k PPP link, even with large values for MTU/MRU.

Note that this does nothing to fix the problems that Solaris
has with sending to a linux box when MTU/MRU is large. I'm still
trying to decide if there is a way we can deal with the Solaris
problem from the linux side of the link. For now use a smaller MTU/MSS
if you want fast transfers from Solaris to Linux.

-- eric

---------------------------------------------------------------------------
Eric Schenk www: http://www.cs.toronto.edu/~schenk
Department of Computer Science email: schenk@cs.toronto.edu
University of Toronto


diff -u -r linux-1.3.89/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux-1.3.89/net/ipv4/tcp_input.c Mon Apr 15 20:15:36 1996
+++ linux/net/ipv4/tcp_input.c Mon Apr 15 23:19:09 1996
@@ -394,7 +394,7 @@
skb_queue_head_init(&newsk->back_log);
newsk->rtt = 0; /*TCP_CONNECT_TIME<<3*/
newsk->rto = TCP_TIMEOUT_INIT;
- newsk->mdev = 0;
+ newsk->mdev = TCP_TIMEOUT_INIT<<1;
newsk->max_window = 0;
newsk->cong_window = 1;
newsk->cong_count = 0;

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.048 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site