From owner-cvs-all@FreeBSD.ORG Tue Jul 5 17:53:38 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 E9FC316A41C; Tue, 5 Jul 2005 17:53:38 +0000 (GMT) (envelope-from peter@wemm.org) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7B1443D49; Tue, 5 Jul 2005 17:53:38 +0000 (GMT) (envelope-from peter@wemm.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id AD6DE2A8F9; Tue, 5 Jul 2005 10:53:38 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 58CA9E2B3; Tue, 5 Jul 2005 10:53:38 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.13.4/8.13.1) with ESMTP id j65Hrbqo033591; Tue, 5 Jul 2005 10:53:37 -0700 (PDT) (envelope-from peter@wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.13.4/8.13.1/Submit) id j65HrbY0033590; Tue, 5 Jul 2005 10:53:37 -0700 (PDT) (envelope-from peter@wemm.org) X-Authentication-Warning: overcee.wemm.org: peter set sender to peter@wemm.org using -f From: Peter Wemm To: Peter Grehan Date: Tue, 5 Jul 2005 10:53:36 -0700 User-Agent: KMail/1.8.1 References: <200507022313.j62NDWYC028248@repoman.freebsd.org> <42C90419.8070509@freebsd.org> In-Reply-To: <42C90419.8070509@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507051053.37195.peter@wemm.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Andrew Thompson Subject: Re: cvs commit: src/sys/amd64/include _types.h src/sys/i386/include _types.h src/sys/net if_bridge.c src/sys/netinet ip_var.h src/sys/netinet6 ip6_var.h 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: Tue, 05 Jul 2005 17:53:39 -0000 On Monday 04 July 2005 02:40 am, Peter Grehan wrote: > > Check the alignment of the IP header before passing the packet up > > to the packet filter. This would cause a panic on architectures > > that require strict alignment such as sparc64 (tier1) and ia64/ppc > > (tier2). > > FYI, any modern ppc implementation doesn't require strict alignment > for integer load/stores though there's a performance penalty for > having to split the access into smaller ones. As an aside, I've been contemplating taking a shot at having the AC (alignment checking) turned on for the amd64 kernel and see what breaks. But rather than trying to do bit-shifting bcopys etc, I was thinking about toggling it off/on around known offenders. It could be interesting to allow userland to turn it on/off for its own use as well. But I suspect that touching %cr0 on the fly at syscall entry/exit could be a serious microcode cost. But still, it might be an interesting thing to have available as a diagnostic tool. Unaligned accesses are slower here too. And there are ugly side effects if the unaligned access crosses a cache line boundary. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5