Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2013 15:41:15 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r248417 - head/sys/sys
Message-ID:  <20130325114115.GU76816@FreeBSD.org>
In-Reply-To: <51459ED3.4040304@freebsd.org>
References:  <201303170739.r2H7djP1098888@svn.freebsd.org> <51458691.4090107@freebsd.org> <20130317093339.GT48089@FreeBSD.org> <51459ED3.4040304@freebsd.org>

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

  sorry for delay.

On Sun, Mar 17, 2013 at 11:45:39AM +0100, Andre Oppermann wrote:
A> On 17.03.2013 10:33, Gleb Smirnoff wrote:
A> > On Sun, Mar 17, 2013 at 10:02:09AM +0100, Andre Oppermann wrote:
A> > A> On 17.03.2013 08:39, Gleb Smirnoff wrote:
A> > A> > Author: glebius
A> > A> > Date: Sun Mar 17 07:39:45 2013
A> > A> > New Revision: 248417
A> > A> > URL: http://svnweb.freebsd.org/changeset/base/248417
A> > A> >
A> > A> > Log:
A> > A> >    Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for
A> > A> >    mbufs with external buffer.
A> > A>
A> > A> While you are cleaning up the mbuf usage wouldn't it make sense to remove
A> > A> these macros, instead of adding new ones, and use m_align() which handles
A> > A> all these cases internally?
A> >
A> > I'm thinking about this. Maybe it is worth to request tail alignment as
A> > a flag to the allocating function itself?
A> 
A> IMHO that would overload the allocation function(s).  The explicit step of
A> doing m_align() for those who need it is fine and alerts the reader of what
A> is going on.  I'm all for simplification and unification, on the other hand
A> it shouldn't be taken too far creating new complexity on the other side.

That would be one less function call and one less branching, that was my point.

Actually we can extend that later w/o API breakage.

-- 
Totus tuus, Glebius.



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