[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP RTT esimates
> > 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.
BTW, it doesn't seem necessary to check if (t_srtt_+= delta) <= 0.