lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Fast retransmit


From: K.J. Mansley
Subject: Re: [lwip-users] Fast retransmit
Date: 13 Jul 2004 14:29:12 +0100

On Tue, 2004-07-13 at 11:28, K.J. Mansley wrote:
> The answer would seem to be that when tcp_rexmit is called from the fast
> retransmit code, it moves *all* unacked segments to the unsent queue,
> which will mean *all* unacked segments are retransmitted.  This is not
> what should happen.  Does anyone know why this change was made?  There
> could be a good reason for it that I've not thought of.

I've had another look, and there seems to be a number of things that
aren't quite right.

Current behaviour:

1) When third duplicate ACK is received, retransmit all unacked segments

2) Set ssthresh to:
pcb->ssthresh = LWIP_MAX((pcb->snd_max - pcb->lastack) / 2, 2 * pcb->mss)

3) Set congestion window to ssthresh + 3 * max segment size.


Expected Behaviour (according to Stevens: TCP/IP Illustrated, Vol I,
21.7):

1) When third duplicate ACK is received, set ssthresh to half the
minimum of the congestion window and the receiver's advertised window:

            if(pcb->cwnd > pcb->snd_wnd)
              pcb->ssthresh = pcb->snd_wnd / 2;
            else
              pcb->ssthread = pcb->cwnd / 2;

2) Retransmit the missing segment, not all unacked segments.

3) Set congestion window to ssthresh + 3 * max segment size.

Note, 1) and 2) swap order, and the change in calculating ssthresh. 
This also has the advantage that we do not need to search the unsent
queue when a new ACK is received, as we don't dump the whole unacked
queue onto the unsent queue.

I've implemented these changes, but I'm not in a position to test it,
and it's the sort of thing that could have unforeseen effects.  If I
check this in, would anyone (perhaps Sam Jansen?) be willing to have
another look over it and make sure it's behaving properly?

Also, if anyone has objections to this change, speak now!

Thanks

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]