|
From: | Piero 74 |
Subject: | Re: [lwip-devel] application above lwip too low - lwip memp overflow |
Date: | Thu, 15 Jan 2009 17:11:01 +0100 |
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).
That is strange because lwip_close() calls netconn_delete() which callsPiero 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?
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
_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel
lwip_err_recovery.JPG
Description: JPEG image
[Prev in Thread] | Current Thread | [Next in Thread] |