[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TCP RTT esimates



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_.

If the marked line above read:

>>>>		delta = (t_rtt_ - t_srtt_ )>> T_SRTT_BITS;	// d = (m - a0)

Am I missing something embarassingly obvious? If so, please let me know.

I apologize if this has already been discussed, but I have done a (quick)
search through the mailing list archives.

Thanks in advance,

David.

--
David Lapsley, Research Engineer
Melbourne Information Technologies Australia Pty. Ltd.
3/207 Bouverie Street, Carlton, Vic. 3053, Australia
Telephone: +61 3 9344 9386, Facsimile: +61 3 9347 9473