This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MBUF's in stack TCP/IP



"=?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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]