Improve accuracy of Rx RTT calculation by skipping retransmitted packets
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 5 Oct 2009 18:34:59 +0000 (14:34 -0400)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Mon, 12 Oct 2009 13:48:59 +0000 (06:48 -0700)
commit917a860e818d5cdda82add0d4d50b594820816f2
tree3cf6527d490fa737f1ce8a15b7839aea7b009265
parent76ae0f51892a703d7bd4aea5fdcf60c586e4a440
Improve accuracy of Rx RTT calculation by skipping retransmitted packets

Rx RTT calculations are based on Van Jacobson's work using
constants that make computations fast but are not necessarily
the best for modeling Rx protocol exchanges.  This patch does
not alter the constants but does improve the comments to show
that the math is correct.

Phil Karn in 1987 demonstrated that Van Jacobson's algorithms
produced inaccurate results when the RTT computed from an
acknowledgement of a retransmitted packet were included.  The
resulting RTT would either be too small causing the system to
retransmit too many packets or too long resulting in too few
being sent.

This patch follows Phil Karn's advice which was also adopted
as mandatory for TCP in RFC2988.  Retransmitted packets and
delayed acks are skipped and the retransmit time is backed off
(up to a maximum of 3 seconds) until a successful acknowlegement
is received for an initially transmitted packet.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/580
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/rx/rx.c
src/rx/rx.h
src/rx/rx_clock.h