Updating timestamps (ts_recent) in Linux

"Duke, Martin" <martin.duke@boeing.com> Fri, 11 July 2003 20:23 UTC

Delivered-To: tcp-impl@guns.lerc.nasa.gov
X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Subject: Updating timestamps (ts_recent) in Linux
Date: Fri, 11 Jul 2003 13:23:08 -0700
Message-ID: <B96DB973FD58EE469E4426886240EE97787918@xch-nw-03.nw.nos.boeing.com>
Thread-Topic: Updating timestamps (ts_recent) in Linux
Thread-Index: AcNH6m3g2KazX44vR4KLcpKXjHtpFw==
From: "Duke, Martin" <martin.duke@boeing.com>
To: tcp-impl@grc.nasa.gov
X-OriginalArrivalTime: 11 Jul 2003 20:23:08.0390 (UTC) FILETIME=[3DF52060:01C347EA]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by lombok-fi.lerc.nasa.gov id h6BKOCLc019282
Sender: owner-tcp-impl@grc.nasa.gov
Precedence: bulk
Status: RO
Content-Length: 1662
Lines: 21

I've heard rumors that this has been discussed before on tcp-impl, but an extensive search found no messages on this topic.

How do people feel about the way Linux decides what timestamp to echo?

Specifically, although the behavior is compliant with RFC 1323, an old addendum to the RFC (http://www.kohala.com/start/tcplw-extensions.txt) pointed out some odd behavior.

Essentially, if the connection goes down, the subsequent retransmissions will have later ts values.  However, if an ACK was lost, the kernel currently does not update ts_recent with these values.  If the channel comes back up and a retrans succeeds, the client will send an ack with an ts echo equal to the old value of ts_recent.

As the difference between the echo and the current time is quite large, it 
will result in an extremely large RTT measurement, triggering a huge increase 
in the RTO.  In an unreliable, bursty link, such as satellites, another outage 
could occur shortly thereafter, and an inappropriately long timeout can occur.

The reason for the problem is that ts_recent is only updated if the receive window moves to the right.  Ideally, packets with sequence numbers to the left of the window edge should trigger an update as well.

There are certainly situations where the current Linux behavior is terrible, but I have yet to see an explanation for why this "bug" should not be fixed.  I've heard criticisms of the document cited above as a whole but have yet to understand why updating ts_recent more frequently will break something.  I know that BSD fixed this some time ago (Stevens talks about it in his book).

Any thoughts?

Martin Duke
martin.duke@boeing.com