Proposal: Add M_HASCL().
Andre Oppermann
andre at freebsd.org
Thu Mar 1 12:33:43 UTC 2007
Bruce M. Simpson wrote:
> Bruce M Simpson wrote:
>> Much network code needs to know if the mbuf it is looking at is using
>> a cluster. I propose putting M_HASCL() in sys/mbuf.h. I realise this
>> is a style change, however, it seems to be a very common idiom.
> I sent this, then I looked at NetBSD, having caught a glimpse of their
> MBUFTRACE code when skimming lots of diffs. That is also a good idea,
> and might help us catch problems before they go prime-time; I've added
> it to the wiki.
>
> Point there is, M_HASCL() seems to be a hangover from the 4.4BSD era.
> NetBSD seems to treat clusters and external storage as separate
> entities. So I'm reconsidering this in the light of this new evidence.
>
> As far as I understand it, the presence of M_EXT in an mbuf chain's
> header in FreeBSD always indicate that we are using external storage
> (not necessarily, but possibly, a cluster).
>
> Can someone confirm this?
This is correct. M_EXT is set whenever external storage is attached
to an mbuf. We have many different classes of external storage with
traditional 2k clusters being one of them.
--
Andre
More information about the freebsd-net
mailing list