<dec f='src/src/sys/netinet/tcp_var.h' l='589'/>
<doc f='src/src/sys/netinet/tcp_var.h' l='560'>/*
 * See RFC2988 for a discussion of RTO calculation; comments assume
 * familiarity with that document.
 *
 * The smoothed round-trip time and estimated variance are stored as
 * fixed point numbers.  Historically, srtt was scaled by
 * TCP_RTT_SHIFT bits, and rttvar by TCP_RTTVAR_SHIFT bits.  Because
 * the values coincide with the alpha and beta parameters suggested
 * for RTO calculation (1/8 for srtt, 1/4 for rttvar), the combination
 * of computing 1/8 of the new value and transforming it to the
 * fixed-point representation required zero instructions.  However,
 * the storage representations no longer coincide with the alpha/beta
 * shifts; instead, more fractional bits are present.
 *
 * The storage representation of srtt is 1/32 slow ticks, or 1/64 s.
 * (The assumption that a slow tick is 500 ms should not be present in
 * the code.)
 *
 * The storage representation of rttvar is 1/16 slow ticks, or 1/32 s.
 * There may be some confusion about this in the code.
 *
 * For historical reasons, these scales are also used in smoothing the
 * average (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
 * This results in alpha of 0.125 and beta of 0.25, following RFC2988
 * section 2.3
 *
 * XXX Change SHIFT values to LGWEIGHT and REP_SHIFT, and adjust
 * the code to use the correct ones.
 */</doc>
<use f='src/src/sys/netinet/tcp_input.c' l='3512' u='c'/>
<use f='src/src/sys/netinet/tcp_input.c' l='3571' u='c'/>
<use f='src/src/sys/netinet/tcp_subr.c' l='1201' u='c'/>
<use f='src/src/sys/netinet/tcp_subr.c' l='2177' u='c'/>
<use f='src/src/sys/netinet/tcp_subr.c' l='2185' u='c'/>
<use f='src/src/sys/netinet/tcp_timer.c' l='400' u='c'/>
<use f='src/src/sys/netinet/tcp_usrreq.c' l='269' u='c'/>
