From owner-freebsd-current Thu Jan 2 10:54: 1 2003 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 33FFA37B401 for ; Thu, 2 Jan 2003 10:54:00 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B69143ED1 for ; Thu, 2 Jan 2003 10:53:59 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.6/8.12.6) with ESMTP id h02Irwro017548 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 2 Jan 2003 13:53:58 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h02IrrO48547; Thu, 2 Jan 2003 13:53:53 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15892.35521.181516.714686@grasshopper.cs.duke.edu> Date: Thu, 2 Jan 2003 13:53:53 -0500 (EST) To: Bosko Milekic Cc: current@freebsd.org Subject: Re: mbuf header bloat ? In-Reply-To: <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> <20021126191526.B78371@unixdaemons.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 Bosko Milekic writes: > > 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). I'm just tuning up my driver now to catch up to the "recent" interface changes. While there, I went to add a ref count for my driver managed M_EXT clusters. However, m_extadd() does not take a parameter for assignment into mp->m_ext.ref_cnt Eg, I cannot call m_extadd() if I want to use my own refcounter. Is there any chance this could be fixed? O/w, I'll have to avoid calling m_extadd().. Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message