Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2003 13:53:53 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Bosko Milekic <bmilekic@unixdaemons.com>
Cc:        current@freebsd.org
Subject:   Re: mbuf header bloat ?
Message-ID:  <15892.35521.181516.714686@grasshopper.cs.duke.edu>
In-Reply-To: <20021126191526.B78371@unixdaemons.com>
References:  <15840.8629.324788.887872@grasshopper.cs.duke.edu> <Pine.BSF.4.21.0211232306410.28833-100000@InterJet.elischer.org> <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>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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