I've committed a large comment change.
The following diff fixes a 1-tick bias error in rtt estimation. We have
been running it in a private tree, and I haven't tested it in current.
I'll check it in at the earlier of my testing it, someone reporting that
they have tested it, or the tech-net TCP experts concurring.
The rationale was in the previous commit. Basically, ts_rtt is set to
now - send + 1
so that it can be tested against 0 to represent 'no valid estimate' and
one has to undo the 1 before use. (This was ok in 4.4BSD and is a
NetBSD regression from 15 years ago.)
Index: tcp_input.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/tcp_input.c,v
retrieving revision 1.309
diff -u -p -r1.309 tcp_input.c
--- tcp_input.c 20 Apr 2011 13:35:51 -0000 1.309
+++ tcp_input.c 20 Apr 2011 13:42:32 -0000
@@ -1754,7 +1754,7 @@ after_listen:
* this is a pure ack for outstanding data.
*/
if (ts_rtt)
- tcp_xmit_timer(tp, ts_rtt);
+ tcp_xmit_timer(tp, ts_rtt - 1);
else if (tp->t_rtttime &&
SEQ_GT(th->th_ack, tp->t_rtseq))
tcp_xmit_timer(tp,
@@ -2437,7 +2437,7 @@ after_listen:
* Recompute the initial retransmit timer.
*/
if (ts_rtt)
- tcp_xmit_timer(tp, ts_rtt);
+ tcp_xmit_timer(tp, ts_rtt - 1);
else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq))
tcp_xmit_timer(tp, tcp_now - tp->t_rtttime);
Attachment:
pgp76Q4NmXwPF.pgp
Description: PGP signature