[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP timeout
>
> From: ihor v strutynskyj cis stnt <[email protected]>
> To: [email protected]
> Subject: Re: TCP timeout
> Date: Wed, 28 Jan 1998 20:42:14 EST
>
> void TcpAgent::newtimer(Packet* pkt)
> {
> hdr_tcp *tcph = (hdr_tcp*)pkt->access(off_tcp_);
> if (pkt_seqno_ > tcph->seqno())
> set_rtx_timer();
> else
> cancel_rtx_timer();
> }
>
> Instead of set_rtx_timer(), which reschedules timer to
> now+rtt_timeout(), use set_rtx_timer(offset), where
> offset = now - time_sent_[(pkt->seqno_ + 1)%maxcwnd_]; //line 1***
> Array time_sent_ keeps output timestamps of the packets
> per window.
> Then set_rtx_timer(offset) will reschedule timer to expire
> at now+rtt_timeout()-offset.
>
> The other possible way could be to set
> offset=rtt_timeout()+(now-time_sent_[(pkt->seqno_ + 1)%maxcwnd_]);
> and reschedule timer to now+offset in set_rtx_timer(offset);
>
> This way retx timer will be bound to actual packets sending time
> and not to the receiving time of ACK of the previous segment.
> Everywhere else calls to set_rtx_timer() can be substituted to
> set_rtx_timer(0.0) (or offset=0.0 by default and leave it unchanged).
> That's in case of the first version of offset.
>
> I did a little research in this area and found that BSD
> (Stevens Vol.2, and NetBSD1.2) has it the way it currently is in NS.
> Linux on the other side has it the way I described. I feel the
> second way is more correct.(What do you think?)
> ...
The main issue here is whether or not to keep rtt estimates on a per-packet
or per-window basis. The per-packet has the first issue of additional space
required to hold up to maxcwnd number of departure times. The more subtle
issue, however, is that you can wind up with a too-quickly-adapting RTT estimate.
The gain constants for the mean and deviation estimators are tuned for a
once-per-window update interval. There has been discussion of this issue,
possibly on the end-to-end interest list, but I do not have copies of the msgs (sorry).
- Kevin