From owner-freebsd-net@FreeBSD.ORG Mon May 2 23:12:56 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EDC916A4CF for ; Mon, 2 May 2005 23:12:56 +0000 (GMT) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.FreeBSD.org (Postfix) with SMTP id 5698943D7B for ; Mon, 2 May 2005 23:12:55 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 3805 invoked from network); 2 May 2005 23:12:54 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 2 May 2005 23:12:54 -0000 X-pair-Authenticated: 209.68.2.70 Date: Mon, 2 May 2005 18:12:44 -0500 (CDT) From: Mike Silbersack To: Bruce M Simpson In-Reply-To: <20050428165026.GG747@empiric.icir.org> Message-ID: <20050502180353.T787@odysseus.silby.com> References: <20050428135120.GB21428@cell.sick.ru> <427111BF.2050607@savvis.net> <20050428165026.GG747@empiric.icir.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: harti@FreeBSD.org cc: Gleb Smirnoff cc: net@FreeBSD.org cc: jmg@FreeBSD.org cc: Sten Spans Subject: Re: if_tap unaligned access problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 23:12:56 -0000 On Thu, 28 Apr 2005, Bruce M Simpson wrote: > jmg's suggestion of bringing in the NetBSD patches to allow the entire > network stack to be compiled with unaligned accesses (for those platforms > which support it) is interesting because it can simplify or eliminate > some of the acrobatics needed in network drivers to deal with the mbuf > alignment. I'm too lazy to benchmark, but I suspect that having the ethernet code shift the packet backwards by two bytes after it strips off the ethernet header is going to be faster than requiring ip_input to allocate a new mbuf for each received packet. Such a change would also ensure that we don't break all the other protocols that jmg didn't touch in his patch. Mike "Silby" Silbersack