This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: MBUF's in stack TCP/IP
- To: ecos-discuss at sources dot redhat dot com
- Subject: Re: [ECOS] MBUF's in stack TCP/IP
- From: Hugo Tyson <hmt at redhat dot com>
- Date: 17 May 2001 11:28:17 +0100
- References: <002701c0deb2$6bfbe870$1400a8c0@rts.com.pl>
- Reply-To: ecos-discuss at sources dot redhat dot com
"=?iso-8859-2?B?TWFyZWsgo7Fja2k=?=" <lacki@rts.com.pl> writes:
> I have still problem with stack TCP/IP on MPC850. I have servers TCP and
> UDP( two threads) . Whole time I sent messages one after the other to
> servers. This test I did through 24 hours. After 2 hours I received the
> message : warning: eth_recv out of MBUFs" . It is OK( normall thing ) but
> when I disconnected board from net , stack should release MBUFs and
> stack should return to normal work. Stack doesn't do it. What is wrong???
> I use a CVS version from day 2001-02-23
There are a couple of reasons an app can run out of MBUFs and not recover.
a) If the app loops opening a socket in response to requests, but doesn't
close the socket, that will use up memory. So if your server gets an error
due to the normal "too busy" out of MBUFs situation, and jumps out 'cos of
the error, make sure it closes all sockets it had opened. I've made that
mistake myself in writing testcases.
b) Is this your own ethernet driver? If the ethernet driver does not call
tx_done() to report that a transmission is completed (whether it succeeded
or not) then the stack thinks that the memory is still owned by the
ethernet driver. All memory the ether driver is given to tx must be
returned to the stack or it will be lost.
I have run tests repeatedly opening and closing sockets to do ping
operations, with hosts pinging and flood-pinging the target, and also
performing continuous SNMP interrogations of the target (ie. connect to a
UDP server, do lots of traffic, disconnect). These run OK for days at a
time, honest!
- Huge