From owner-cvs-all@FreeBSD.ORG Thu Aug 11 22:54:04 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 572DA16A420; Thu, 11 Aug 2005 22:54:04 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (60-234-149-201.bitstream.orcon.net.nz [60.234.149.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC23143D46; Thu, 11 Aug 2005 22:54:03 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 5D4811CCD4; Fri, 12 Aug 2005 10:54:02 +1200 (NZST) Date: Fri, 12 Aug 2005 10:54:02 +1200 From: Andrew Thompson To: Max Laier Message-ID: <20050811225402.GA70630@heff.fud.org.nz> References: <200508112057.j7BKvxVs083144@repoman.freebsd.org> <200508120032.44995.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508120032.44995.max@love2party.net> User-Agent: Mutt/1.4.2.1i Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_bridge.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2005 22:54:04 -0000 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)