lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Out Of Order Sequence (Segments?)


From: Jonathan Larmour
Subject: Re: [lwip-users] Out Of Order Sequence (Segments?)
Date: Tue, 08 Apr 2008 18:51:38 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Bill Auerbach wrote:
> 
>> Most likely packet loss, and your remote end (the sender) has not
>> retransmitted the missing packet yet. It could mean that your receive
>> window size is too large for the pbuf space you have available. In other
>> words, you are telling the remote end that it can send more data without
>> acknowledgement than you actually have room for.
> 
> What is hard to determine is what number of pbufs is good?  I don't want to
> be on the edge, but I don't want to allocate 100 or more that I need.

Depends on your lwipopts.h settings, and the expected traffic pattern (or
at least the level of traffic you want to keep efficient). Clearly in
general the more memory the better, so it's then a question of where the
compromises are going to be.

>> That sounds like a port or driver problem (or a bug I haven't
>> encountered).
> 
> Or a PowerPC problem.  There is some kind of problem using a DMA channel to
> copy memory from the TSEC BD pointer to data to my data buffer.  I know it's
> hard to believe, but I don't have problems with a limited number of pbufs if
> I use a software copy, or if I use DMA and have about 100 extra pbufs.  This
> is the reason for the processor freezing with limited pbufs, *not* the OOS
> list consuming pbufs.

Not much I can help with there I'm afraid. Although I've played with a
powerpc FEC in the past, it's been a while and I imagine the problem is
specific to your driver design.

>>> Should there be a #define and a test and for the amount of ooseq's to be
>>> allowed to be buffered?  If not, what is a practical limit?
>> Your receive window (TCP_WND in lwipopts.h).
> 
> With 65535, that isn't easy to accommodate.  Is that number divided by the
> MTU a reasonable estimate?  If there are so many out of order sequences, I
> think I'll have bigger problems (like bandwidth).

If you're expecting one connection at a time, then TCP_WND divided by
PBUF_POOL_BUFSIZE should give you something around the desired
PBUF_POOL_SIZE. Of course there will be inefficiencies unless you also tune
your MSS accordingly too, so received packets closely fit into your pbufs.
If you are expecting to receive more data than one connection, then you
have to start making guesses as to peak pbuf use. That's when it's useful
to start playing with the lwIP statistics (LWIP_STATS) to see what the max
used resources have been on a particular run.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
 **  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
 **  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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