2 .\" Copyright (c) 2010-2011 The FreeBSD Foundation
4 .\" This documentation was written at the Centre for Advanced Internet
5 .\" Architectures, Swinburne University of Technology, Melbourne, Australia by
6 .\" David Hayes under sponsorship from the FreeBSD Foundation.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
21 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd Enhanced Round Trip Time Khelp module
36 .In netinet/khelp/h_ertt.h
40 Khelp module works within the
42 framework to provide TCP with a per-connection, low noise estimate of the
44 The implementation attempts to be robust in the face of delayed
45 acknowledgements, TCP Segmentation Offload (TSO), receivers who manipulate TCP
46 timestamps and lack of the TCP timestamp option altogether.
48 TCP receivers using delayed acknowledgements either acknowledge every second packet
49 (reflecting the time stamp of the first) or use a timeout to trigger the
50 acknowledgement if no second packet arrives.
51 If the heuristic used by
53 determines that the receiver is using delayed acknowledgements, it measures the
54 RTT using the second packet (the one that triggers the acknowledgement).
55 It does not measure the RTT if the acknowledgement is for the
56 first packet, since it cannot be accurately determined.
60 will momentarily disable TSO whilst marking a packet to use for a new
62 The process has negligible impact on the connection.
65 associates the following struct with each connection's TCP control block:
68 TAILQ_HEAD(txseginfo_head, txseginfo) txsegi_q; /* Private. */
69 long bytes_tx_in_rtt; /* Private. */
70 long bytes_tx_in_marked_rtt;
71 unsigned long marked_snd_cwnd;
75 int dlyack_rx; /* Private. */
76 int timestamp_errors; /* Private. */
77 int markedpkt_rtt; /* Private. */
82 The fields marked as private should not be manipulated by any code outside of
86 The non-private fields provide the following data:
87 .Bl -tag -width ".Va bytes_tx_in_marked_rtt" -offset indent
88 .It Va bytes_tx_in_marked_rtt
89 The number of bytes transmitted in the
91 .It Va marked_snd_cwnd
92 The value of cwnd for the marked rtt measurement.
94 The most recent RTT measurement.
96 The longest RTT measurement that has been taken.
98 The shortest RTT measurement that has been taken.
100 The ERTT_NEW_MEASUREMENT flag will be set by the implementation when a new
101 measurement is available.
102 It is the responsibility of
104 consumers to unset the flag if they wish to use it as a notification method for
115 Development and testing of this software were made possible in part by grants
116 from the FreeBSD Foundation and Cisco University Research Program Fund at
117 Community Foundation Silicon Valley.
121 module first appeared in
124 The module was first released in 2010 by David Hayes whilst working on the
125 NewTCP research project at Swinburne University of Technology's Centre for
126 Advanced Internet Architectures, Melbourne, Australia.
127 More details are available at:
129 http://caia.swin.edu.au/urp/newtcp/
134 Khelp module and this manual page were written by
135 .An David Hayes Aq Mt david.hayes@ieee.org .
137 The module maintains enhanced RTT estimates for all new TCP connections created
138 after the time at which the module was loaded.
139 It might be beneficial to see if it is possible to have the module only affect
140 connections which actually care about ERTT estimates.