lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] application above lwip too low - lwip memp overflow


From: Jonathan Larmour
Subject: Re: [lwip-devel] application above lwip too low - lwip memp overflow
Date: Thu, 15 Jan 2009 15:01:34 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Piero 74 wrote:
> Hi all
> 
> I'm testing performance of my lwip-application. I'm using socket (using
> select in a loop and recv) [lwip release: 1.3.0 stable]
> 
> I found a strange problem:
> 
> if i will send to my board packets very fast, after sompe packet i will
> have all pbuf of pool in use, and driver will not be able to add new packet.
> But in this situation, i cannot recovery the stack...
> my application after a timeout without packets closes the socket, but
> there is no way to free allcated pbufs
> (see attachment)
> 
> there is something in the lwip head that can avoid this problem?

That is strange because lwip_close() calls netconn_delete() which calls
netconn_free() which is in api/api_msg.c, and as you will see there, the
first thing that does is drain the recvmbox - i.e. the mbox containing
queued up pbufs. So it should recover. I don't know why it wouldn't. I
don't see any changes in CVS since 1.3.0 which would have fixed any problem
here.

Is there any chance your driver is not recovering properly from having
pbuf_alloc fail? e.g. no longer generating further interrupts for new packets?

As for the general problem of running out of pbufs in the first place, you
may wish to reduce your TCP receive window (TCP_WND in lwipopts.h).

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
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]