[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about tcpTick_
> It controls both. The test suite that tests both tcpTick_ and
> retransmit timers is run by "./test-all-tcp" in tcl/test,
> and is described in tcl/test/test-suite-tcp.txt. The current
I could not find any of the above files !
> retransmit timeout value, before any retransmit timer backoffs are
> added in, is as follows in the code:
>
> //
> // Current retransmit value is
> // (unscaled) smoothed round trip estimate
> // plus 4 times (unscaled) rttvar.
> //
> t_rtxcur_ = (((t_rttvar_ << (2 + (T_SRTT_BITS - T_RTTVAR_BITS))) +
> t_srtt_) >> T_SRTT_BITS ) * tcp_tick_;
I just looked up the equivalent piece of code in ns2 and here is what I
found (from tcp.cc):
double timeout = ((t_srtt_ >> 3) + t_rttvar_ + 1) * tcp_tick_;
Now, I have a couple of questions:
(1) Where does the +1 above come from ?
(2) Since t_rttvar_ and t_srtt_ are based on t_rtt_ which is already
normalized by tcp_tick_ as follows:
//
// tao is the measured RTT sample
// t_rtt_ is tao expressed in tcp_tick_ units and rounded
//
t_rtt_ = int((tao / tcp_tick_) + 0.5);
and since t_rtxcur_ is based on the unscaled values of t_rttvar_ and
t_srtt_, does not this mean that if t_srtt_ and t_rttvar_ have higher
granualities then this means that the timeout has a higher granuality
(since t_srtt_ and t_rttvar_ are integers), but the units of the timeout
is always in seconds irrespective of tcp ticks ?
Thanks,
-- Amr