Subject: Re: new mbuf API
To: None <tech-net@NetBSD.org>
From: Pavel Cahyna <pavel@NetBSD.org>
List: tech-net
Date: 04/21/2007 08:25:05
On Fri, Apr 20, 2007 at 06:24:00PM -0500, David Young wrote:
> On Fri, Apr 20, 2007 at 05:24:53PM +0000, Pavel Cahyna wrote:
> > Hello,
> > 
> > I would like to commit the new mbuf API, resulting from last year SoC
> > project, reasonably soon. I described it in an old message:
> > http://permalink.gmane.org/gmane.os.netbsd.devel.network/7959
> > so I won't repeat much here.
> 
> Great!
> 
> Do mptr() and mptr_rw() guarantee any alignment?  Looks (at a glance) like
> "no," but it would be easy enough to add a flag MP_ALIGN for the purpose.
> What do you think?

There are three alignment flags: MP_ALIGN_2, MP_ALIGN_4, MP_ALIGN_8. They
are intended for m_datarange* functions but should work with the mptr*
macros, too. This is undocumented because I think that the macros should
determine the needed alignment automatically, as they know automatically
the needed size. See the thread referenced above. 

(http://thread.gmane.org/gmane.os.netbsd.devel.network/7959 for a threaded
view.)

Pavel