From owner-freebsd-net@FreeBSD.ORG Thu Mar 1 11:05:30 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 DF14316A403 for ; Thu, 1 Mar 2007 11:05:30 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id BC38913C461 for ; Thu, 1 Mar 2007 11:05:30 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 9586A1F3E00 for ; Thu, 1 Mar 2007 06:05:30 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Thu, 01 Mar 2007 06:05:30 -0500 X-Sasl-enc: TJToq+iZKcLGPW9b9IkIpv2VdM1ksC5ZxeUHwJRxaC0Z 1172747130 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id D055521E6C; Thu, 1 Mar 2007 06:05:29 -0500 (EST) Message-ID: <45E6B378.1020703@FreeBSD.org> Date: Thu, 01 Mar 2007 11:05:28 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Bruce M Simpson References: <45E60041.1090607@incunabulum.net> In-Reply-To: <45E60041.1090607@incunabulum.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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 11:05:31 -0000 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