Proposal: Add M_HASCL().

Bruce M. Simpson bms at FreeBSD.org
Thu Mar 1 11:05:31 UTC 2007


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?

Regards,
BMS


More information about the freebsd-net mailing list