lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] I think I found a bug/problem in lwIP stack 1.0.0 (rega


From: K.J. Mansley
Subject: Re: [lwip-users] I think I found a bug/problem in lwIP stack 1.0.0 (regarding retransmissions)
Date: 22 Nov 2004 15:56:16 +0000

On Mon, 2004-11-22 at 07:52, Bonny Gijzen wrote:
> I have thought of 2 solutions. They use a different approach and I am
> not sure which one is correct or preferred:
>  
> 1) When a segment is up for retransmission, then put it onto the
> unsent list, but *LEAVE* it on the unacked list aswell. Then when the
> segment is re-sent, the code must check if this segment is already on
> the unacked list. If not then add it, if it is then dont add it
> (because it is already there).
> The big advantage of this approach is that it preserves the original
> order in which the segments were put on the unacked list.
> (I have implemented this approach using tcp_seg_copy() and
> tcp_seg_free() and it is running a test at the moment)
>  
> 2) The 2nd approach involves not touching the unacked list (so the
> list gets shuffled).
> But when an ACK arrives the *whole* list is checked for a match, and
> not exitting when the 1st segment doesn't match.
>  
> My overall knowlegde of this stack isn't good enough to know which
> approach is better.

Well spotted.  I've had a look at the latest code and I think this is
the result of an oversight from when the retransmission code was changed
to sometimes only retransmit a single packet rather than all packets on
the unacked queue.  

I would have a preference for a method which for most packets does not
involving searching the lists.  Of these, (1) sounds better than (2) in
this respect.  As you have a working fix, could you prepare a patch
(that will preferably apply cleanly to the current CVS code)?  If so,
I'll take a look and try and submit it.

Thanks

Kieran





reply via email to

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