From owner-freebsd-net@FreeBSD.ORG Sun Mar 20 10:23:23 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 2644E16A4CE for ; Sun, 20 Mar 2005 10:23:23 +0000 (GMT) Received: from note.orchestra.cse.unsw.EDU.AU (note.orchestra.cse.unsw.EDU.AU [129.94.242.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ECC043D49 for ; Sun, 20 Mar 2005 10:23:22 +0000 (GMT) (envelope-from lukem@cse.unsw.edu.au) Received: From wagner With LocalMail ; Sun, 20 Mar 2005 21:23:14 +1100 From: lukem.freebsd@cse.unsw.edu.au Sender: lukem@cse.unsw.edu.au To: Mike Silbersack Date: Sun, 20 Mar 2005 21:23:14 +1100 (EST) In-Reply-To: <20050318211424.I99115@odysseus.silby.com> Message-ID: References: <20050317221359.GN89312@funkthat.com> <20050318021907.H844@odysseus.silby.com> <20050318092429.GD37984@funkthat.com> <20050318211424.I99115@odysseus.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-net@FreeBSD.org cc: John-Mark Gurney Subject: Re: changes to make ethernet packets able to be unaligned... 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: Sun, 20 Mar 2005 10:23:23 -0000 Why not just fix the protocols which do unaligned accesses? Is speedup of doing non-byte-wide reads when manipulating packet headers really larger than the cost of aligning everything? I doubt it. Your average tcp packet shoule only cause a few unaligned accesses anyway, so we are putting in a lot of effort to save re-writing a very small number of spots in the protocol stack. Personally, I think it would be better to just remove the alignment constraints altogether, and re-write the protocols to avoid doing unaligned accesses. An easy way to track them down would be to use an architecture which uses exceptions to handle unaligned accesses, and log all the exceptions in the protocol stack. -- Luke