Date: Fri, 12 Aug 2005 10:54:02 +1200 From: Andrew Thompson <thompsa@freebsd.org> To: Max Laier <max@love2party.net> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_bridge.c Message-ID: <20050811225402.GA70630@heff.fud.org.nz> In-Reply-To: <200508120032.44995.max@love2party.net> References: <200508112057.j7BKvxVs083144@repoman.freebsd.org> <200508120032.44995.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 12, 2005 at 12:32:27AM +0200, Max Laier wrote: > On Thursday 11 August 2005 22:57, Andrew Thompson wrote: > > thompsa 2005-08-11 20:57:59 UTC > > > > FreeBSD src repository > > > > Modified files: (Branch: RELENG_6) > > sys/net if_bridge.c > > Log: > > MFC: if_bridge.c, r.1.5 > > > > > Use m_copypacket() which is an optimization of the common case > > > m_copym(m, 0, M_COPYALL, how). > > > > > > This is required for strict alignment architectures where we align the > > > IP header in the input path but m_copym() will create an unaligned copy > > > in bridge_broadcast(). m_copypacket() preserves alignment of the first > > > mbuf. > > I guess we should document this difference between m_copym and m_copypacket ?! > It is in the comment block which is how I discovered it, but mbuf(9) is missing the info about alignment. uipc_mbuf.c: /* * Copy an entire packet, including header (which must be present). * An optimization of the common case `m_copym(m, 0, M_COPYALL, how)'. * Note that the copy is read-only, because clusters are not copied, * only their reference counts are incremented. * Preserve alignment of the first mbuf so if the creator has left * some room at the beginning (e.g. for inserting protocol headers) * the copies still have the room available. */ struct mbuf * m_copypacket(struct mbuf *m, int how)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050811225402.GA70630>