From owner-freebsd-sparc64@FreeBSD.ORG Thu Apr 28 02:29:45 2005 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B50916A4CE for ; Thu, 28 Apr 2005 02:29:45 +0000 (GMT) Received: from mail21.sea5.speakeasy.net (mail21.sea5.speakeasy.net [69.17.117.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F8F443D66 for ; Thu, 28 Apr 2005 02:29:44 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 16624 invoked from network); 28 Apr 2005 02:29:43 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail21.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 28 Apr 2005 02:29:43 -0000 Received: from hydrogen.funkthat.com (elopip@localhost.funkthat.com [127.0.0.1])j3S2Tgmo036116; Wed, 27 Apr 2005 19:29:42 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j3S2TfAg036115; Wed, 27 Apr 2005 19:29:41 -0700 (PDT) Date: Wed, 27 Apr 2005 19:29:41 -0700 From: John-Mark Gurney To: Sten Spans Message-ID: <20050428022941.GN2670@funkthat.com> Mail-Followup-To: Sten Spans , Andrew Belashov , glebius@FreeBSD.org, freebsd-sparc64@FreeBSD.org, freebsd-net@FreeBSD.org References: <200504271552.j3RFqCgv077122@white.orel.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-net@FreeBSD.org cc: glebius@FreeBSD.org cc: freebsd-sparc64@FreeBSD.org Subject: Re: sparc64/80410: netgraph is causing crash with mpd on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2005 02:29:45 -0000 Sten Spans wrote this message on Wed, Apr 27, 2005 at 23:50 +0200: > On Wed, 27 Apr 2005, Sten Spans wrote: > > >>>Description: > >> mpd does not work on FreeBSD/sparc64. Kernel panic with "memory > >>address > >>not aligned" trap message. > >> > >>>How-To-Repeat: > >> Configure and run mpd for VPN over pptp. After connect to VPN, > >>start nmap scanner. Kernel right away crashed. I have coredump: > >> > > > >Finding unaligned ( or rather not 64bit aligned ) mbufs is the > >new cool thing, try if_em or if_tap for more fun and games :). > > > >On a more serious note, the main problem is that l3 protocols > >( ip, ipv6, ipx ) expect their data to be aligned a certain way. > > > >But newer ethernet cards, complex headers, complex tunneling > >tricks, etc often shift contents a few bytes. i386 has no alignment > >constraints ( a small speed hit though ) which means that these > >problems are often overlooked. > > > >OpenBSD and NetBSD have quite a few dirty hacks in drivers to > >fixup the mess for each driver. Some work has been done with > >m_copyup in -CURRENT but the debate is still open on wether > >this should be fixed in a general way in l3 protocols, or in > >each "ethernet" driver, or even somewhere else entirely. > > > >HTH HAND > > > http://mail-index.netbsd.org/source-changes/2002/07/01/0001.html > > After some more thought, this would indeed seem to be the > right direction. It would certainly make life for alpha > and sparc64 users a lot less painfull. Now bring it up on -net (I've cc'd them for you) and try to convince the people over there... I'm all for making the l3 align themselves on arches that need it... That way if someone writes an l3 protocol that only needs to be short aligned, it doesn't have to take the huge performance hit of coping packets around... Though some thinks that it's perfectly fine to hurt the performance of those, and even hurt the bridging case too... What would be useful would be for the l3's to register their required alignment, and make this information available to the drivers.. some cards can dma to arbitrary addresses, so it'd be good for the drivers that can to do so... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."