Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2007 13:07:06 +0100
From:      Andre Oppermann <andre@freebsd.org>
To:        "Bruce M. Simpson" <bms@FreeBSD.org>
Cc:        Bruce M Simpson <bms@incunabulum.net>, net@FreeBSD.org
Subject:   Re: Proposal: Add M_HASCL().
Message-ID:  <45E6C1EA.8030109@freebsd.org>
In-Reply-To: <45E6B378.1020703@FreeBSD.org>
References:  <45E60041.1090607@incunabulum.net> <45E6B378.1020703@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E6C1EA.8030109>