Subject: Re: 386/486 bus timing
To: Charles M. Hannum <mycroft@ai.mit.edu>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 04/22/1995 09:21:57
      Mbuf `clusters' use an optional function pointer to a `free' routine,
      so you can DMA to and from the `cluster' area, and not have to teach
      the board about the structure layouts.  This is also advantageous
      because you can make your `cluster' whatever size is convenient.
   The idea here is that you can fake creating the `cluster' yourself, by
   setting the pointers in the mbuf, and setting the M_EXT bit in the
   flags.

Hmm, I'd forgotten about that.  In fact, you probably don't even need
"fake" clusters, just use normal clustered mbufs[*] and give the board a
list of the one's you've preallocated.  The standard mbuf cluster size
is a bit small for his application, though, so that might be a good reason
for custom clusters.  One handy thing about OSF/1 1.3 is they dumped the
mb_map stuff and just used (a much faster) malloc() straight for mbufs;
they added a primitive MCLSGET() to get an mbuf-cluster of whatever size
you wanted.  Very handy for FDDI and HIPPI drivers.

Still, it's kind of handy to not have to have a separate (fixed size) data 
structure in which to list preallocated buffers.  It's just not clear that
this is worth the pain of having to hope no one gets frisky about rearranging
the mbuf layout.

[*] Almost every time I try to type "mbuf", it comes out "mbug".  I think
there's a message in here...  ;-)