From owner-freebsd-current Tue Nov 26 16:16:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E7D837B401 for ; Tue, 26 Nov 2002 16:16:11 -0800 (PST) Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB95443EA9 for ; Tue, 26 Nov 2002 16:16:10 -0800 (PST) (envelope-from bmilekic@unixdaemons.com) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id gAR0FQt78419; Tue, 26 Nov 2002 19:15:26 -0500 (EST) (envelope-from bmilekic@unixdaemons.com) Date: Tue, 26 Nov 2002 19:15:26 -0500 From: Bosko Milekic To: Andrew Gallatin Cc: current@freebsd.org Subject: Re: mbuf header bloat ? Message-ID: <20021126191526.B78371@unixdaemons.com> References: <15840.8629.324788.887872@grasshopper.cs.duke.edu> <15841.17237.826666.653505@grasshopper.cs.duke.edu> <20021125130005.A75177@unixdaemons.com> <15842.27547.385354.151541@grasshopper.cs.duke.edu> <20021125160122.A75673@unixdaemons.com> <15842.51914.871010.137070@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <15842.51914.871010.137070@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Mon, Nov 25, 2002 at 08:13:46PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Nov 25, 2002 at 08:13:46PM -0500, Andrew Gallatin wrote: > > It is not out of date. The code means: > > > > "If you've given me a counter then I'll use it otherwise I'll try to > > allocate one with malloc()." > > Ah, duh. Thanks. I'd better start providing one in my driver then.. Again, if you're just using regular mbuf clusters (of the 2K variety) you don't need to because mb_alloc will do it for you. If you're using a third-party buffer (e.g., jumbo buf) then you can if you want to but make sure it's not something that requires freeing afterwords (in other words, only do it if you do the exact same thing mb_alloc does for regular clusters because otherwise you'll have to worry about destructing the counter before freeing the mbuf). > Drew -- Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message