Networking: Still waiting for mbuf cluster.

Torsten Landschoff torsten.landschoff at nambition.com
Fri Oct 5 08:00:05 UTC 2007


Hi Thomas,

Thomas Doerfler wrote:
> the messages you mentioned are a typical signal, that someone (the
> driver?) eats up the network buffers. Either they are dropped and not
> properly returned to the free buffer pool, or they are stuck to the
> transmit queue.
>   
Something is very wicked here. By comparing both projects byte by byte,
I found out how to reproduce the problem: In the new project, I was more
"thorough"  about the network configuration and misinterpreted the
"Default mbuf cluster capacity" comment in networkconfig.h.

>From the TCP/IP Illustrated, part 2, I gathered that the default mbuf
cluster size is either 1024 or 2048. To make sure that my MTU fits into
an mbuf cluster, I adjusted networkconfig.h for the 2048 byte capacity.
And forgot about that change...

Turns out that RTEMS defaults to 2048 byte per mbuf cluster, and the
configuration setting in indeed the overall space for mbuf clusters. The
result is a system with exactly a single mbuf cluster, which is not
going to work for any serious load.

I spent a day on that now :-(, but learned a lot about the BSD
networking in RTEMS, so no real harm done.

Thanks for RTEMS, works like a charm now!

  Torsten



More information about the users mailing list