[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP RTT esimates
On Wed, 3 Mar 1999, David Lapsley wrote:
> Dear All,
>
> I've been looking at the source code for the TCP Agent
> in tcp.cc and something does not seem right.
> I would appreciate any help.
>
> The lines that confuse me are:
>
> if (t_srtt_ != 0) {
> register short delta;
> >>>> delta = t_rtt_ - (t_srtt_ >> T_SRTT_BITS); // d = (m - a0)
> if ((t_srtt_ += delta) <= 0) // a1 = 7/8 a0 + 1/8 m
> t_srtt_ = 1;
>
> Where t_srtt_ is the smoothed(average) round trip time, and t_rtt_ is the
> current round trip time sample.
>
> According to this code, the final value of t_srtt_ is 7/8 of the previous
> t_srtt_ + the new round trip time sample t_rtt_. It should be 7/8 of the
> previous t_srtt_ + 1/8 of rtt_.
t_srtt_ is 8 * "smoothed round trip time"
its easier to maintain it that way.. a little more presicion and less
shifts.
vishnu