From owner-freebsd-net@FreeBSD.ORG Thu Mar 1 12:33:43 2007 Return-Path: X-Original-To: net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1400316A402 for ; Thu, 1 Mar 2007 12:33:43 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8622F13C442 for ; Thu, 1 Mar 2007 12:33:42 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 30744 invoked from network); 1 Mar 2007 11:39:46 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 1 Mar 2007 11:39:46 -0000 Message-ID: <45E6C1EA.8030109@freebsd.org> Date: Thu, 01 Mar 2007 13:07:06 +0100 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <45E60041.1090607@incunabulum.net> <45E6B378.1020703@FreeBSD.org> In-Reply-To: <45E6B378.1020703@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Bruce M Simpson , net@FreeBSD.org Subject: Re: Proposal: Add M_HASCL(). X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2007 12:33:43 -0000 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