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]
Other format: [Raw text]

Re: Problem with IP Stack ...


> I had applied the scatter-gatter patches in my version, it just didn't change
> anything. I also tried the latest snapshot (this morning) of ECOS, still no
> success.

I didn't think it would make a difference, but you never know.

> There is one interesting thing, however, I discovered just this
> morning. I redirected the diag_printf messages to a different
> (debug) stream (not IP based) and ECOS does not crash any longer!

That not really surprising. Using the stack to debug the stack is
never a good idea. Have gdb user the serial port, not the stack. 

> With the diag_printf redirection in place I also see that the IP
> stack does not recover MBUFs (at least not within a few minutes)
> although it is still answering pings. It seems that MBUFs are never
> recovered not even in regular operation. At

Thats not correct. The number of mbufs is not going to zero. You have
lots of mbufs free. The information it prints out for clusters is 0,
but that figure is bogus anyway. The stack gets clusters from the
pool. It does not return them to the pool, but puts them on a linked
list. When it needs another cluster, it first tries the linked list
and then tries the pool.

So i think you are running out of clusters, not mbufs. To prove this,
change io/eth/current/net/eth_drv.c:873. The error message is
wrong. MCLGET allocates a cluster not an mbuf. Change this message so
you can tell it apart from the error at line 820.

Whats interesting is that number of free clusters does not slowly
drop, but jumps. Some sort of event is happening which causes a whole
lot of clusters to suddenly get lost. I would look at the ring
buffer. What happens when the receive ring buffer wraps around when
the ethernet device is receiving faster than the stack is taking them
out of the ring buffer. I've had problems like this with TX.

    Andrew


> Misc mpool: total   65520, free   61648, max free block 61028
> Mbufs pool: total   65408, free   56064, blocksize  128
> Clust pool: total  131072, free       0, blocksize 2048
> Network stack mbuf stats:
>    mbufs 72, clusters 63, free clusters 27
>    Failed to get 0 times
>    Waited to get 0 times
>    Drained queues to get 139 times
> Misc mpool: total   65520, free   61648, max free block 61028
> Mbufs pool: total   65408, free   56064, blocksize  128
> Clust pool: total  131072, free       0, blocksize 2048
> Network stack mbuf stats:
>    mbufs 72, clusters 63, free clusters 27
>    Failed to get 0 times
>    Waited to get 0 times
>    Drained queues to get 139 times
> Misc mpool: total   65520, free   61648, max free block 61028
> Mbufs pool: total   65408, free   56064, blocksize  128
> Clust pool: total  131072, free       0, blocksize 2048





-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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