[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] LWIP and sliding window
From: |
Yann Suisini |
Subject: |
Re: [lwip-users] LWIP and sliding window |
Date: |
Thu, 1 Oct 2009 02:38:09 -0700 (PDT) |
Here's the way for sending data with TCPnet :
(we guess the connection is established)
First I get a tcp buffer with tcp_get_buf function.
( http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_get_buf.htm
http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_get_buf.htm )
The max size I can request is MSS (max 1500 bytes).
After I send the data with tcp_send(...)
http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_send.htm
http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_send.htm
Before I can send data again I have to be sure the previous data was ACK
with tcp_check_send(...)
http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_check_send.htm
http://www.keil.com/support/man/docs/rlarm/rlarm_tcp_check_send.htm
so, the TCP stack only allows to send one frame one to one . the stack uses
a little trick to force the ACK from remote to avoid delayed ACK :
IF you want to send 1000 bytes of data , the stack send a first frame of 996
bytes , immediately followed by another frame with the last 4 bytes. This is
the only optimization for the bandwidth ... :,(
Kieran Mansley wrote:
>
> On Wed, 2009-09-30 at 10:57 -0700, Yann Suisini wrote:
>> ello ,
>>
>>
>> Currently I'm using the KEIL TCPnet stack on my system (ARM LPC23xx) .
>> It's working well on a LAN with low latency (about 650KB/s on the
>> embedded
>> ftp server with SD card access).
>> But I can only send frames one at one , waiting for an ACK before I can
>> send
>> another frame .
>> So with high ping about 300ms on a intercontinental connection , I get
>> this
>> :
>>
>> 1500 bytes sent
>> 300ms before ack
>> 1500 bytes sent
>> 300ms for ACK...
>>
>> So the max I get in this case is about 3.5 KB/s !!!
>>
>> I would replace this stack by Lwip but I would know if I cand send more
>> than
>> one frames before waiting for an ACK
>> in order to optimize use of the bandwith. So , does Lwip manges tcp
>> windowing ?
>
> Yes lwIP can do this, but I find it very hard to believe that there is
> any TCP stack that doesn't do TCP windowing. Are you sure the KEIL
> TCPnet stack can't do this? You may just need to change the way it is
> configured.
>
> Kieran
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
--
View this message in context:
http://www.nabble.com/LWIP-and-sliding-window-tp25688074p25695710.html
Sent from the lwip-users mailing list archive at Nabble.com.