lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] RE: lwIP TCP Dup Ack problem


From: Ramanathan Ramadass
Subject: RE: [lwip-users] RE: lwIP TCP Dup Ack problem
Date: Thu, 2 Aug 2007 13:49:44 -0700 (PDT)

I think I figured out why the Dup ACK is happening but a soln. has to be
well tested. Here is the explanation;

"tcp_recved()" is called on receipt of a packet (in TCP_EVENT_RECV) which
sets the TF_DELAY_ACK flag on the pcb through "tcp_ack()". When the tcp
fast timer fires and since TF_DELAY_ACK is set, "tcp_output()" is called
through "tcp_ack_now()". This then sends an empty ACK if the TF_ACK_NOW
flag is set AND either there is no data to send or the window does not
allow it (there is an helpful comment in tcp_output() explaining this).
This results in the Dup ACK.

Regards
Ram

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Kieran Mansley
Sent: Thursday, August 02, 2007 1:04 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] RE: lwIP TCP Dup Ack problem

On Wed, 2007-08-01 at 12:45 -0700, Ramanathan Ramadass wrote:

> 2. I am finding some odd behaviour w.r.t. Dup Acks. While I am hunting
> it down; I am not sure whether it is a known problem and/or whether it
> has been fixed. Attached is a trace of the problem. It was generated
> using "nc" (netcat). In the trace;
> 
>             - 20.1.1.2 is the Linux client
> 
>             - 10.1.1.2 is our system using lwIP's TCP.

Hmm, no obvious ideas about what might be causing this but I can confirm
that it doesn't look right.

I suppose it could be caused by there being some confusion within the
stack about the delayed ACK flag.  If this got set when it shouldn't do
(or not cleared when it should), then the fast timer went off, it might
result in the stack sending an extra ACK packet.  To see if this is
happening, search for TF_ACK_DELAY within the source, and you should
find all the places that set or clear this flag.  I'd try adding some
tracing to see when this is getting set, and whether the duplicate ACK
packets sent are due to it being set when the timer goes off.

Hope that helps

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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