[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: retransmission every 9 pacakets.
From: |
Yang |
Subject: |
[lwip-users] Re: retransmission every 9 pacakets. |
Date: |
Fri, 14 Sep 2007 08:49:09 +0800 |
>
>On Thu, 2007-09-13 at 11:16 +0800, Yang wrote:
>> Hi Kieran!
>> The trace is in attach file. It's a ftp server I wrote with lwip
>> socket.
>> You can see that if data is send both side, in control link, it work
>> fine.
>> but as data link send file to PC, retrans happends.
>
>Hmm, I see retransmissions in both parts (both control and data
>transfer) of the connection. Which end of the connection is lwIP, and
>which end something else?
>
>My guess from looking at the trace is that the receiving end is using
>delayed ACKs (it only acknowledges every other packet) and this is fine
>when the sender has enough data to send two packets. However, if it
>only sends one packet, the receiver is supposed to time out and send an
>ACK anyway. This isn't happening before the sender gives up waiting for
>an ACK and retransmits. The problem is I think with the sender as it's
>not waiting long enough for the ACK, rather than with with the
>receiver's delayed ACK. It should be waiting at least 200ms before
>retransmitting (or more like 1 second to be fully RFC compliant), but
>they're all coming out faster than that - more like 150ms.
>
>If lwIP is the sender, I would check that the TCP timers are being
>called with the correct intervals.
>
>Kieran
>
The ftp server is the lwip side(192.168.2.123) ,which work on a ARM embed
system, the client is a windowxp pc(192.168.2.1).
yes,I haven't try to make the timer mach the real time clock. But I think
, by doing so, it would only make the lwip to wait a much longer time for
retransmission, without sending next packages.
In the control link, it was fine since I do have no more package to send
until
the data linke finish. But in the data link, I have lot's of datas waitting
to send---This trace show only the start part of the whole trans(a 10M file).
I make another test by using "select" in both the control and data link,
and find out the the frequence of retrans in data link is rise to every 3
packages.
I am sure it have enough data, I use a for cycle to send the 10m file without
doing any other thing. And I am sure lwip have enough pbuf, a 32k pbuf pool is
allocated for it.
I thinks the real question is : what would case lwip to stop sending datas
waiting to send and wait for a ack?
I had make a echo server on the same board with the same lwip setting, speed
is upto 1.7MB/s, since the pc answer every package without delay. And with
this ftp server, I got only 400 kB/s!
Is there a way to force PC side to send ack for every package? It may help
too,
I guess!
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Yang
address@hidden
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-09-14