lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] With logs ... Re: Delayed Ack causing problems? Where t


From: FreeRTOS Info
Subject: Re: [lwip-users] With logs ... Re: Delayed Ack causing problems? Where to call tcp_nagle_disable()?
Date: Tue, 13 Sep 2011 15:12:18 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Hi Simon,

That would be excellent - and exactly the feedback I would look for.  As
stated previously, my intention is for these to be "reference"
implementations, which is why I am using both the raw and sockets
interfaces, so there is an example of each.

Various lwipopts files are attached, renamed to indicate which project
they are used with.  From your ping pong explanation, it sounds like the
cause lies within.


Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.




On 13/09/2011 14:38, Simon Goldschmidt wrote:
> Richard Barry <address@hidden> wrote:
>> I had to change lwipopts.h slightly to reduce the RAM footprint
> 
> In fact, the lwipopts.h settings are the most interesting here. Would you 
> mind sending your file (as attachment)?
> 
> There are some things I don't (yet) understand in the traces (e.g. why does 
> the client announce an MSS of 1260 only? I would have expected 1460 here...)
> 
> The problem could be that you seem to be limited to 2048 byts of snd_buf and 
> with nagle enabled, lwIP-tcp waits to fill a 2nd segment (of 1260 bytes), 
> which it can't and thus doesn't send (maybe we should enhance the nagle-check 
> here?).
> 
> For decent TCP performance, you should ensure that:
> - TCP_WND is at least 4 * TCP_MSS (or the remote mss here)
> - SND_BUF is as big as the window (4 * mss might also be enough)
> - SND_QUEUELEN should not limit the transfer either (i.e. when passing the 
> copy-flag to tcp_write, it should be at least 4 and you should call tcp_write 
> with the biggest possible chunk size)
> 
> Not obeing the rules above will make the connection slow (i.e. you will 
> prevent the sliding window algorithm to work smoothly and instead turn your 
> TCP connections into a ping-pong style of DATA-ACK-DATA-ACK etc.).
> 
> I'll try to reproduce (and maybe fix) this with your lwipopts.h.
> 
> Simon

Attachment: lwipopts_LPC17xx_used_to_generate_logs_already_sent.h
Description: Text document

Attachment: lwipopts_MicroBlaze.h
Description: Text document

Attachment: lwipopts_WIN32.h
Description: Text document


reply via email to

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