[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Help : Is TCP newack() subroutine correct ?
Estella -
>I read the newack() subroutine of tcp.cc. I discover that the timer is
>canceled or re-scheduled (by newtimer() subroutine) before the
>retranmission timeout is re-evaluated. Should the sequence be reversed,
>i.e. the retransmission timeout should be re-calculated and then the
>retransmission timer can be re-scheduled (In fact, this is also the
>sequence in the book TCP/IP Illustrated Vol. 2) ?
>
>However, since the subroutine has been there for a while, I suppose I
>may be correct. Hence, have I missed anything ?
I just looked at the newack() code in tcp.cc, and it contains the
following comment:
/*
* Wouldn't it be better to set the timer *after*
* updating the RTT, instead of *before*?
*/
I can't think off-hand of any reason not to make that change.
(Controlled by a parameter, for backwards compatibility.)
But it would require some restructuring of the code (since the
condition in newtimer for checking whether the timer should be
reset checks if "t_seqno > tcph->seqno()", and "t_seqno" is updated
later on in newack(), before the RTT is updated), and I don't have
the time right now to do it with the proper care...
- Sally
--------------------------------
http://www.aciri.org/floyd/
--------------------------------