From owner-freebsd-alpha@FreeBSD.ORG Sun Nov 21 12:35:03 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69EE616A4CE; Sun, 21 Nov 2004 12:35:03 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7A0143D48; Sun, 21 Nov 2004 12:35:02 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [192.168.1.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id E055E3E437; Sun, 21 Nov 2004 13:35:00 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id 6A1E927E; Sun, 21 Nov 2004 13:35:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id 51338192; Sun, 21 Nov 2004 13:35:00 +0100 (CET) Date: Sun, 21 Nov 2004 13:35:00 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: <200411191601.11773.jhb@FreeBSD.org> Message-ID: References: <200411191601.11773.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 12:35:03 -0000 On Fri, 19 Nov 2004, John Baldwin wrote: > On Friday 19 November 2004 04:32 am, Sten Spans wrote: >> On Mon, 15 Nov 2004, Sten Spans wrote: >>> On Mon, 15 Nov 2004, John Baldwin wrote: >>>> On Monday 15 November 2004 04:07 pm, Sten Spans wrote: >>>>> On Mon, 15 Nov 2004, John Baldwin wrote: >>>>> >>>>> changed to ((off0 & 0x3) != 0), didn't seem to print anything. >>>> >>>> Ok, try this one then instead: >>>> >>>> Index: netinet/tcp_input.c >>>> =================================================================== >>>> RCS file: /usr/cvs/src/sys/netinet/tcp_input.c,v >>>> retrieving revision 1.255 >>>> diff -u -r1.255 tcp_input.c >>>> --- netinet/tcp_input.c 7 Nov 2004 19:19:35 -0000 1.255 >>>> +++ netinet/tcp_input.c 15 Nov 2004 21:19:50 -0000 >>>> @@ -504,6 +504,8 @@ >>>> } >>>> } >>>> ip = mtod(m, struct ip *); >>>> + if (((uintptr_t)ip & 0x3) != 0) >>>> + printf("%s: ip %p is misaligned\n", __func__, ip); >>>> ipov = (struct ipovly *)ip; >>>> th = (struct tcphdr *)((caddr_t)ip + off0); >>>> tlen = ip->ip_len; >>> >>> This does print something: >>> deepthought# ifconfig em0 mtu 1501 >>> deepthought# tcp_input: ip 0xfffffc001817f00e is misaligned >>> >>> fatal kernel trap: >>> >>> trap entry = 0x4 (unaligned access fault) >>> faulting va = 0xfffffc001817f02e >>> opcode = 0x28 >>> register = 0x1 >>> pc = 0xfffffc00004cd134 >>> ra = 0xfffffc00004ccf94 >>> sp = 0xfffffe00187a9af0 >>> curthread = 0xfffffc001f3a70e0 >>> pid = 14, comm = swi1: net >>> >>> [thread 100006] >>> Stopped at tcp_input+0x3a4: srl t0,#0x2,t0 >>> >>> >>> The ip's used are 192.168.1.3 and 192.168.1.4. >> >> Any luck or should I turn this into a pr ? > > Sorry, been busy recently. A PR certainly wouldn't hurt. Ok, I'll get that going. > Does this panic go > away if you use a different MTU btw? I've tried running i=1; while true; echo $i; ifconfig em0 mtu $i; let i++; sleep 2; and on the client: while true; do echo bla | telnet alpha 22; sleep 1; done this caused no crashes with mtu 1-1500. But: deepthought# ifconfig em0 mtu 1666 deepthought# tcp_input: ip 0xfffffc0018cdb00e is misaligned deepthought# ifconfig em0 mtu 1564 deepthought# tcp_input: ip 0xfffffc001857c80e is misaligned deepthought# ifconfig em0 mtu 1532 deepthought# tcp_input: ip 0xfffffc001859300e is misaligned If it has to be 8 bytes aligned then it's off by 4, doesn't seem to be vlanmtu though. -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 22 11:01:54 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AC4B16A4CE for ; Mon, 22 Nov 2004 11:01:54 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4254943D67 for ; Mon, 22 Nov 2004 11:01:54 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iAMB1sfK075883 for ; Mon, 22 Nov 2004 11:01:54 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iAMB1rP9075877 for freebsd-alpha@freebsd.org; Mon, 22 Nov 2004 11:01:53 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 22 Nov 2004 11:01:53 GMT Message-Id: <200411221101.iAMB1rP9075877@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-alpha@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 11:01:54 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/09/10] alpha/30486 alpha AlphaServer DS10 floppy access is broken o [2001/09/10] alpha/30487 alpha Floppy access on AlphaServer DS20 solid l o [2003/02/05] alpha/47952 alpha DEFPA causes machine check with V5.0-rele o [2003/11/10] alpha/59116 alpha [ntfs] mount_ntfs of a Windows 2000-forma o [2004/01/26] alpha/61940 alpha Can't disklabel new disk from FreeBSD/alp o [2004/01/27] alpha/61973 alpha Machine Check on boot-up of AlphaServer 2 f [2004/06/06] alpha/67626 alpha X crashes an alpha machine, resulting reb 7 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/01/27] alpha/24663 alpha Console output gets scribbled into /var/l o [2001/02/22] alpha/25284 alpha PC164 won't reboot with graphics console o [2001/06/07] alpha/27930 alpha NE2000 not supported on FreeBSD Alpha 4.x o [2001/06/07] alpha/27933 alpha Time jitter under load on FreeBSD 4.3 alp f [2001/07/29] alpha/29299 alpha FreeBSD 4.3 Alpha + Tekram SCSI adapter p o [2001/10/01] alpha/30970 alpha Ensoniq 1371 (Creative chipset) does not o [2002/01/24] alpha/34232 alpha rpc.statd throws alignment errors o [2002/05/13] alpha/38031 alpha osf1.ko not loaded during boot-time of li p [2002/11/12] alpha/45240 alpha pstat -f column headings misaligned on Al o [2003/02/25] alpha/48676 alpha Changing the baud rate of serial consoles o [2003/04/12] alpha/50868 alpha fd0 floppy device is not mapped into /dev o [2004/05/10] alpha/66478 alpha unexpected machine check: panic for 4.9, o [2004/06/13] alpha/67903 alpha hw.chipset.memory: 1099511627776 - thats o [2004/09/23] alpha/72024 alpha LONG_MIN / 1 sends a "Floating exception" 14 problems total. From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 22 18:17:32 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FEC816A4CE for ; Mon, 22 Nov 2004 18:17:32 +0000 (GMT) Received: from web50610.mail.yahoo.com (web50610.mail.yahoo.com [206.190.38.249]) by mx1.FreeBSD.org (Postfix) with SMTP id E2B7E43D31 for ; Mon, 22 Nov 2004 18:17:31 +0000 (GMT) (envelope-from randall272-fbsd@yahoo.com) Received: (qmail 618 invoked by uid 60001); 22 Nov 2004 18:17:31 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=QyYBZR9rSXkBjCnHfHdPSn1bxsRsT9xF5ETMI9c9FXS6PepRarpFNvIGrbvDERueYkHFAr9GIdOeyNdVTHsv6oiz27se6JGwZBC+JLN8A2NHWrAZA1TeKgM2dWJmCu308jV/WMwSolARxm8y+aStgUHP+OijeFe6L93C8IP605I= ; Message-ID: <20041122181723.543.qmail@web50610.mail.yahoo.com> Received: from [12.39.218.27] by web50610.mail.yahoo.com via HTTP; Mon, 22 Nov 2004 10:17:23 PST Date: Mon, 22 Nov 2004 10:17:23 -0800 (PST) From: To: Kenneth Stailey , freebsd-alpha@FreeBSD.org In-Reply-To: <20041116131537.88041.qmail@web50609.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: why Xorg and XFree86 > 3.3.6 crash on my box X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: randall272-fbsd@yahoo.com List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 18:17:32 -0000 --- Kenneth Stailey wrote: > Well I'm not sure exactly but I do know now that there is an x86 emulator of > sorts built into XFree-4 and therefor Xorg too and the function of the > emulator > is to run the BIOS code from the video card. I'm fairly certain that the X > server crashes in the emulator during startup. > It was pointed out to me that adding Option "NoInt10" to the Device (video card) settings in the xorg.conf file works. I'm up on Xorg now on AS 1000A w/Matrox Mystique. I will be trying a Millenum card in a few days. From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 22 20:23:53 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42EE016A4CF for ; Mon, 22 Nov 2004 20:23:53 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4EBC43D4C for ; Mon, 22 Nov 2004 20:23:52 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 349 invoked from network); 22 Nov 2004 20:23:52 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 22 Nov 2004 20:23:51 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iAMKNXFA029419; Mon, 22 Nov 2004 15:23:39 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-alpha@FreeBSD.org Date: Mon, 22 Nov 2004 14:32:41 -0500 User-Agent: KMail/1.6.2 References: <200411191601.11773.jhb@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411221432.42028.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Robert Watson Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 20:23:53 -0000 On Sunday 21 November 2004 07:35 am, Sten Spans wrote: > On Fri, 19 Nov 2004, John Baldwin wrote: > > On Friday 19 November 2004 04:32 am, Sten Spans wrote: > >> On Mon, 15 Nov 2004, Sten Spans wrote: > >>> On Mon, 15 Nov 2004, John Baldwin wrote: > >>>> On Monday 15 November 2004 04:07 pm, Sten Spans wrote: > >>>>> On Mon, 15 Nov 2004, John Baldwin wrote: > >>>>> > >>>>> changed to ((off0 & 0x3) != 0), didn't seem to print anything. > >>>> > >>>> Ok, try this one then instead: > >>>> > >>>> Index: netinet/tcp_input.c > >>>> =================================================================== > >>>> RCS file: /usr/cvs/src/sys/netinet/tcp_input.c,v > >>>> retrieving revision 1.255 > >>>> diff -u -r1.255 tcp_input.c > >>>> --- netinet/tcp_input.c 7 Nov 2004 19:19:35 -0000 1.255 > >>>> +++ netinet/tcp_input.c 15 Nov 2004 21:19:50 -0000 > >>>> @@ -504,6 +504,8 @@ > >>>> } > >>>> } > >>>> ip = mtod(m, struct ip *); > >>>> + if (((uintptr_t)ip & 0x3) != 0) > >>>> + printf("%s: ip %p is misaligned\n", __func__, ip); > >>>> ipov = (struct ipovly *)ip; > >>>> th = (struct tcphdr *)((caddr_t)ip + off0); > >>>> tlen = ip->ip_len; > >>> > >>> This does print something: > >>> deepthought# ifconfig em0 mtu 1501 > >>> deepthought# tcp_input: ip 0xfffffc001817f00e is misaligned > >>> > >>> fatal kernel trap: > >>> > >>> trap entry = 0x4 (unaligned access fault) > >>> faulting va = 0xfffffc001817f02e > >>> opcode = 0x28 > >>> register = 0x1 > >>> pc = 0xfffffc00004cd134 > >>> ra = 0xfffffc00004ccf94 > >>> sp = 0xfffffe00187a9af0 > >>> curthread = 0xfffffc001f3a70e0 > >>> pid = 14, comm = swi1: net > >>> > >>> [thread 100006] > >>> Stopped at tcp_input+0x3a4: srl t0,#0x2,t0 > >>> > >>> > >>> > >>> The ip's used are 192.168.1.3 and 192.168.1.4. > >> > >> Any luck or should I turn this into a pr ? > > > > Sorry, been busy recently. A PR certainly wouldn't hurt. > > Ok, I'll get that going. > > > Does this panic go > > away if you use a different MTU btw? > > I've tried running > > i=1; while true; echo $i; ifconfig em0 mtu $i; let i++; sleep 2; > > and on the client: > while true; do echo bla | telnet alpha 22; sleep 1; done > > this caused no crashes with mtu 1-1500. > > But: > deepthought# ifconfig em0 mtu 1666 > deepthought# tcp_input: ip 0xfffffc0018cdb00e is misaligned > deepthought# ifconfig em0 mtu 1564 > deepthought# tcp_input: ip 0xfffffc001857c80e is misaligned > deepthought# ifconfig em0 mtu 1532 > deepthought# tcp_input: ip 0xfffffc001859300e is misaligned > > If it has to be 8 bytes aligned then it's off by 4, doesn't > seem to be vlanmtu though. Ok, this is helpful I think. (Big MTU -> panic.) The next step is probably to start walking up the stack determining where the pointer starts off and how it ends up aligned. Can you use gdb to figure out the source file/line of the previous stack frame before tcp_input()? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 22 21:15:04 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4730916A4CE; Mon, 22 Nov 2004 21:15:04 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D9BD43D2D; Mon, 22 Nov 2004 21:15:03 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [IPv6:2001:960:301:3:a00:20ff:fe85:fa39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 672063E434; Mon, 22 Nov 2004 22:15:02 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id E5AF127E; Mon, 22 Nov 2004 22:15:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id DA810192; Mon, 22 Nov 2004 22:15:01 +0100 (CET) Date: Mon, 22 Nov 2004 22:15:01 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: <200411221432.42028.jhb@FreeBSD.org> Message-ID: References: <200411221432.42028.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 21:15:04 -0000 On Mon, 22 Nov 2004, John Baldwin wrote: > On Sunday 21 November 2004 07:35 am, Sten Spans wrote: >>> Does this panic go >>> away if you use a different MTU btw? >> >> I've tried running >> >> i=1; while true; echo $i; ifconfig em0 mtu $i; let i++; sleep 2; >> >> and on the client: >> while true; do echo bla | telnet alpha 22; sleep 1; done >> >> this caused no crashes with mtu 1-1500. >> >> But: >> deepthought# ifconfig em0 mtu 1666 >> deepthought# tcp_input: ip 0xfffffc0018cdb00e is misaligned >> deepthought# ifconfig em0 mtu 1564 >> deepthought# tcp_input: ip 0xfffffc001857c80e is misaligned >> deepthought# ifconfig em0 mtu 1532 >> deepthought# tcp_input: ip 0xfffffc001859300e is misaligned >> >> If it has to be 8 bytes aligned then it's off by 4, doesn't >> seem to be vlanmtu though. erm, that would be 2. > > Ok, this is helpful I think. (Big MTU -> panic.) Another thing is : deepthought# ifconfig em0 mtu 9000 sten@ford:~$ ping -s 8000 intern.dt PING intern.deepthought.blinkenlights.nl (192.168.1.3) 8000(8028) bytes of data. 8008 bytes from intern.deepthought.blinkenlights.nl (192.168.1.3): icmp_seq=1 ttl=64 time=1.19 ms 8008 bytes from intern.deepthought.blinkenlights.nl (192.168.1.3): icmp_seq=2 ttl=64 time=0.756 ms 21:59:12.587494 IP intern.ford > intern.deepthought.blinkenlights.nl: icmp 8008: echo request seq 1 21:59:12.588223 IP intern.deepthought.blinkenlights.nl > intern.ford: icmp 8008: echo reply seq 1 21:59:13.587730 IP intern.ford > intern.deepthought.blinkenlights.nl: icmp 8008: echo request seq 2 Aka icmp does work, which makes me think that the problem is tcp specific. I've also tried disabling all the sack/tcp sysctl's but that didn't seem to help. And I've tried connecting from a box with mtu 1500, but that also caused the same panic. I'll get an sk card soonish which will allow me to double check this panic with another nic. Although I would not guess that the panic is driver specific. Which makes me wonder why lo0 does work: deepthought# ifconfig lo0 mtu 1501 deepthought# telnet 127.0.0.1 22 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. SSH-2.0-OpenSSH_3.8.1p1 FreeBSD-20040419 > The next step is probably > to start walking up the stack determining where the pointer starts off and > how it ends up aligned. Can you use gdb to figure out the source file/line > of the previous stack frame before tcp_input()? sure: db> trace tcp_input() at tcp_input+0x3a4 ip_input() at ip_input+0x9fc netisr_processqueue() at netisr_processqueue+0xac swi_net() at swi_net+0xf0 ithread_loop() at ithread_loop+0x1d4 fork_exit() at fork_exit+0x100 exception_return() at exception_return --- root of call graph --- (gdb) l *tcp_input+0x3a4 0xfffffc00004cd054 is in tcp_input (/usr/src/sys/netinet/tcp_input.c:554). 549 550 /* 551 * Check that TCP offset makes sense, 552 * pull out TCP options and adjust length. XXX 553 */ 554 off = th->th_off << 2; 555 if (off < sizeof (struct tcphdr) || off > tlen) { 556 tcpstat.tcps_rcvbadoff++; 557 goto drop; 558 } (gdb) l *ip_input+0x9fc 0xfffffc00004c355c is in ip_input (/usr/src/sys/netinet/ip_input.c:739). 734 /* 735 * Switch out to protocol's input routine. 736 */ 737 ipstat.ips_delivered++; 738 739 (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); 740 return; 741 bad: 742 m_freem(m); 743 } (gdb) l *netisr_processqueue+0xac 0xfffffc00004ad45c is in netisr_processqueue (/usr/src/sys/net/netisr.c:233). 228 229 for (;;) { 230 IF_DEQUEUE(ni->ni_queue, m); 231 if (m == NULL) 232 break; 233 ni->ni_handler(m); 234 } 235 } 236 237 /* -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 22 22:12:39 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9978B16A4D0 for ; Mon, 22 Nov 2004 22:12:39 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08C5B43D48 for ; Mon, 22 Nov 2004 22:12:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30675 invoked from network); 22 Nov 2004 22:12:38 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 22 Nov 2004 22:12:38 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iAMMCGQm030184; Mon, 22 Nov 2004 17:12:33 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Sten Spans Date: Mon, 22 Nov 2004 17:11:54 -0500 User-Agent: KMail/1.6.2 References: <200411221432.42028.jhb@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411221711.54916.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 22:12:39 -0000 On Monday 22 November 2004 04:15 pm, Sten Spans wrote: > On Mon, 22 Nov 2004, John Baldwin wrote: > > On Sunday 21 November 2004 07:35 am, Sten Spans wrote: > >>> Does this panic go > >>> away if you use a different MTU btw? > >> > >> I've tried running > >> > >> i=1; while true; echo $i; ifconfig em0 mtu $i; let i++; sleep 2; > >> > >> and on the client: > >> while true; do echo bla | telnet alpha 22; sleep 1; done > >> > >> this caused no crashes with mtu 1-1500. > >> > >> But: > >> deepthought# ifconfig em0 mtu 1666 > >> deepthought# tcp_input: ip 0xfffffc0018cdb00e is misaligned > >> deepthought# ifconfig em0 mtu 1564 > >> deepthought# tcp_input: ip 0xfffffc001857c80e is misaligned > >> deepthought# ifconfig em0 mtu 1532 > >> deepthought# tcp_input: ip 0xfffffc001859300e is misaligned > >> > >> If it has to be 8 bytes aligned then it's off by 4, doesn't > >> seem to be vlanmtu though. > > erm, that would be 2. > > > Ok, this is helpful I think. (Big MTU -> panic.) > > Another thing is : > > deepthought# ifconfig em0 mtu 9000 > sten@ford:~$ ping -s 8000 intern.dt > PING intern.deepthought.blinkenlights.nl (192.168.1.3) 8000(8028) bytes of > data. 8008 bytes from intern.deepthought.blinkenlights.nl (192.168.1.3): > icmp_seq=1 ttl=64 time=1.19 ms 8008 bytes from > intern.deepthought.blinkenlights.nl (192.168.1.3): icmp_seq=2 ttl=64 > time=0.756 ms > > 21:59:12.587494 IP intern.ford > intern.deepthought.blinkenlights.nl: icmp > 8008: echo request seq 1 21:59:12.588223 IP > intern.deepthought.blinkenlights.nl > intern.ford: icmp 8008: echo reply > seq 1 21:59:13.587730 IP intern.ford > intern.deepthought.blinkenlights.nl: > icmp 8008: echo request seq 2 > > Aka icmp does work, which makes me think that the > problem is tcp specific. I've also tried disabling all > the sack/tcp sysctl's but that didn't seem to help. > And I've tried connecting from a box with mtu 1500, > but that also caused the same panic. > > > I'll get an sk card soonish which will allow me to double > check this panic with another nic. Although I would not guess > that the panic is driver specific. Which makes me wonder why > lo0 does work: > deepthought# ifconfig lo0 mtu 1501 > deepthought# telnet 127.0.0.1 22 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > SSH-2.0-OpenSSH_3.8.1p1 FreeBSD-20040419 > > > The next step is probably > > to start walking up the stack determining where the pointer starts off > > and how it ends up aligned. Can you use gdb to figure out the source > > file/line of the previous stack frame before tcp_input()? > > sure: > > db> trace > tcp_input() at tcp_input+0x3a4 > ip_input() at ip_input+0x9fc > netisr_processqueue() at netisr_processqueue+0xac > swi_net() at swi_net+0xf0 > ithread_loop() at ithread_loop+0x1d4 > fork_exit() at fork_exit+0x100 > exception_return() at exception_return > --- root of call graph --- > > (gdb) l *tcp_input+0x3a4 > 0xfffffc00004cd054 is in tcp_input (/usr/src/sys/netinet/tcp_input.c:554). > 549 > 550 /* > 551 * Check that TCP offset makes sense, > 552 * pull out TCP options and adjust length. > XXX > 553 */ > 554 off = th->th_off << 2; > 555 if (off < sizeof (struct tcphdr) || off > tlen) { > 556 tcpstat.tcps_rcvbadoff++; > 557 goto drop; > 558 } > (gdb) l *ip_input+0x9fc > 0xfffffc00004c355c is in ip_input (/usr/src/sys/netinet/ip_input.c:739). > 734 /* > 735 * Switch out to protocol's input routine. > 736 */ > 737 ipstat.ips_delivered++; > 738 > 739 (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); > 740 return; > 741 bad: > 742 m_freem(m); > 743 } > (gdb) l *netisr_processqueue+0xac > 0xfffffc00004ad45c is in netisr_processqueue > (/usr/src/sys/net/netisr.c:233). > 228 > 229 for (;;) { > 230 IF_DEQUEUE(ni->ni_queue, m); > 231 if (m == NULL) > 232 break; > 233 ni->ni_handler(m); > 234 } > 235 } Hmm, so can you check here to see if the 'm' pointer in this routine is misaligned? If so, then this may be a driver bug. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-alpha@FreeBSD.ORG Tue Nov 23 00:16:06 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C28516A4CF; Tue, 23 Nov 2004 00:16:06 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEA9743D54; Tue, 23 Nov 2004 00:16:05 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [192.168.1.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 5B3933E434; Tue, 23 Nov 2004 01:16:03 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id DBB8227E; Tue, 23 Nov 2004 01:16:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id CFBAF192; Tue, 23 Nov 2004 01:16:02 +0100 (CET) Date: Tue, 23 Nov 2004 01:16:02 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: <200411221711.54916.jhb@FreeBSD.org> Message-ID: References: <200411221711.54916.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 00:16:06 -0000 On Mon, 22 Nov 2004, John Baldwin wrote: > On Monday 22 November 2004 04:15 pm, Sten Spans wrote: >> >> db> trace >> tcp_input() at tcp_input+0x3a4 >> ip_input() at ip_input+0x9fc >> netisr_processqueue() at netisr_processqueue+0xac >> swi_net() at swi_net+0xf0 >> ithread_loop() at ithread_loop+0x1d4 >> fork_exit() at fork_exit+0x100 >> exception_return() at exception_return >> --- root of call graph --- >> >> (gdb) l *tcp_input+0x3a4 >> 0xfffffc00004cd054 is in tcp_input (/usr/src/sys/netinet/tcp_input.c:554). >> 549 >> 550 /* >> 551 * Check that TCP offset makes sense, >> 552 * pull out TCP options and adjust length. >> XXX >> 553 */ >> 554 off = th->th_off << 2; >> 555 if (off < sizeof (struct tcphdr) || off > tlen) { >> 556 tcpstat.tcps_rcvbadoff++; >> 557 goto drop; >> 558 } >> (gdb) l *ip_input+0x9fc >> 0xfffffc00004c355c is in ip_input (/usr/src/sys/netinet/ip_input.c:739). >> 734 /* >> 735 * Switch out to protocol's input routine. >> 736 */ >> 737 ipstat.ips_delivered++; >> 738 >> 739 (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); >> 740 return; >> 741 bad: >> 742 m_freem(m); >> 743 } >> (gdb) l *netisr_processqueue+0xac >> 0xfffffc00004ad45c is in netisr_processqueue >> (/usr/src/sys/net/netisr.c:233). >> 228 >> 229 for (;;) { >> 230 IF_DEQUEUE(ni->ni_queue, m); >> 231 if (m == NULL) >> 232 break; >> 233 ni->ni_handler(m); >> 234 } >> 235 } > > Hmm, so can you check here to see if the 'm' pointer in this routine is > misaligned? If so, then this may be a driver bug. > --- netisr.c.orig Tue Nov 23 00:21:38 2004 +++ netisr.c Tue Nov 23 00:21:45 2004 @@ -230,6 +230,8 @@ IF_DEQUEUE(ni->ni_queue, m); if (m == NULL) break; + if (((uintptr_t)m & 0x3) != 0) + printf("%s: mbuf %p is misaligned\n", __func__, m); ni->ni_handler(m); } } doesn't seem to print anything, but ... if_em.c 2442 2443 /*if (ifp->if_mtu <= ETHERMTU) { */ 2444 m_adj(mp, ETHER_ALIGN); 2445 /*} */ 2446 does seem to fix the crash, also trashes the performance, but that's another matter. It looks like mbuf alignment is needed, if_bge seems to provide reasonable examples. -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem From owner-freebsd-alpha@FreeBSD.ORG Tue Nov 23 02:02:38 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D21B16A4CE; Tue, 23 Nov 2004 02:02:38 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BD3943D46; Tue, 23 Nov 2004 02:02:37 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [IPv6:2001:960:301:3:a00:20ff:fe85:fa39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 60A653E434; Tue, 23 Nov 2004 03:02:36 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id DA5F027E; Tue, 23 Nov 2004 03:02:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id CCD33192; Tue, 23 Nov 2004 03:02:35 +0100 (CET) Date: Tue, 23 Nov 2004 03:02:35 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 02:02:38 -0000 On Tue, 23 Nov 2004, Sten Spans wrote: > On Mon, 22 Nov 2004, John Baldwin wrote: > >> On Monday 22 November 2004 04:15 pm, Sten Spans wrote: >>> >>> db> trace >>> tcp_input() at tcp_input+0x3a4 >>> ip_input() at ip_input+0x9fc >>> netisr_processqueue() at netisr_processqueue+0xac >>> swi_net() at swi_net+0xf0 >>> ithread_loop() at ithread_loop+0x1d4 >>> fork_exit() at fork_exit+0x100 >>> exception_return() at exception_return >>> --- root of call graph --- >>> >>> (gdb) l *tcp_input+0x3a4 >>> 0xfffffc00004cd054 is in tcp_input (/usr/src/sys/netinet/tcp_input.c:554). >>> 549 >>> 550 /* >>> 551 * Check that TCP offset makes sense, >>> 552 * pull out TCP options and adjust length. >>> XXX >>> 553 */ >>> 554 off = th->th_off << 2; >>> 555 if (off < sizeof (struct tcphdr) || off > tlen) { >>> 556 tcpstat.tcps_rcvbadoff++; >>> 557 goto drop; >>> 558 } >>> (gdb) l *ip_input+0x9fc >>> 0xfffffc00004c355c is in ip_input (/usr/src/sys/netinet/ip_input.c:739). >>> 734 /* >>> 735 * Switch out to protocol's input routine. >>> 736 */ >>> 737 ipstat.ips_delivered++; >>> 738 >>> 739 (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); >>> 740 return; >>> 741 bad: >>> 742 m_freem(m); >>> 743 } >>> (gdb) l *netisr_processqueue+0xac >>> 0xfffffc00004ad45c is in netisr_processqueue >>> (/usr/src/sys/net/netisr.c:233). >>> 228 >>> 229 for (;;) { >>> 230 IF_DEQUEUE(ni->ni_queue, m); >>> 231 if (m == NULL) >>> 232 break; >>> 233 ni->ni_handler(m); >>> 234 } >>> 235 } >> >> Hmm, so can you check here to see if the 'm' pointer in this routine is >> misaligned? If so, then this may be a driver bug. >> > > --- netisr.c.orig Tue Nov 23 00:21:38 2004 > +++ netisr.c Tue Nov 23 00:21:45 2004 > @@ -230,6 +230,8 @@ > IF_DEQUEUE(ni->ni_queue, m); > if (m == NULL) > break; > + if (((uintptr_t)m & 0x3) != 0) > + printf("%s: mbuf %p is misaligned\n", __func__, m); > ni->ni_handler(m); > } > } > > doesn't seem to print anything, but ... > > if_em.c > 2442 > 2443 /*if (ifp->if_mtu <= ETHERMTU) { */ > 2444 m_adj(mp, ETHER_ALIGN); > 2445 /*} */ > 2446 > > does seem to fix the crash, also trashes the performance, > but that's another matter. It looks like mbuf alignment is > needed, if_bge seems to provide reasonable examples. And looking at netbsd/openbsd clarifies the whole issue, #ifdef __STRICT_ALIGNMENT /* * The ethernet payload is not 32-bit aligned when * Jumbo packets are enabled, so on architectures with * strict alignment we need to shift the entire packet * ETHER_ALIGN bytes. Ugh. */ This diff probably should be merged. http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_em.c.diff?r1=1.22&r2=1.23 Although I don't know wether freebsd has the STRICT_ALIGNMENT define. -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem From owner-freebsd-alpha@FreeBSD.ORG Tue Nov 23 03:09:22 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6D4E16A4CE; Tue, 23 Nov 2004 03:09:22 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CCCE43D41; Tue, 23 Nov 2004 03:09:22 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [IPv6:2001:960:301:3:a00:20ff:fe85:fa39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 29ECC3E434; Tue, 23 Nov 2004 04:09:21 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id A47E727E; Tue, 23 Nov 2004 04:09:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id 9764A192; Tue, 23 Nov 2004 04:09:20 +0100 (CET) Date: Tue, 23 Nov 2004 04:09:20 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 03:09:23 -0000 On Tue, 23 Nov 2004, Sten Spans wrote: >> doesn't seem to print anything, but ... >> >> if_em.c >> 2442 >> 2443 /*if (ifp->if_mtu <= ETHERMTU) { */ >> 2444 m_adj(mp, ETHER_ALIGN); >> 2445 /*} */ >> 2446 >> >> does seem to fix the crash, also trashes the performance, >> but that's another matter. It looks like mbuf alignment is >> needed, if_bge seems to provide reasonable examples. > > And looking at netbsd/openbsd clarifies the whole issue, > > #ifdef __STRICT_ALIGNMENT > /* > * The ethernet payload is not 32-bit aligned when > * Jumbo packets are enabled, so on architectures > with > * strict alignment we need to shift the entire > packet > * ETHER_ALIGN bytes. Ugh. > */ > > > This diff probably should be merged. > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_em.c.diff?r1=1.22&r2=1.23 > > Although I don't know wether freebsd has the STRICT_ALIGNMENT define. This is an initial patch based on the openbsd code, which solves the if_em issue, and seems to give ok performance ( note to self: turn off debugging when testing network performance ). Comments welcome. --- if_em.c.orig Tue Nov 23 03:03:23 2004 +++ if_em.c Tue Nov 23 03:20:15 2004 @@ -2784,8 +2784,57 @@ /* Assign correct length to the current fragment */ mp->m_len = len; +#ifndef __i386__ + /* + * The ethernet payload is not 32-bit aligned when + * Jumbo packets are enabled, so on architectures with + * strict alignment we need to shift the entire packet + * ETHER_ALIGN bytes. Ugh. + */ + if (ifp->if_mtu > ETHERMTU) { + unsigned char tmp_align_buf[ETHER_ALIGN]; + int tmp_align_buf_len = 0; + + if (prev_len_adj > adapter->align_buf_len) + prev_len_adj -= adapter->align_buf_len; + else + prev_len_adj = 0; + + if (mp->m_len > MCLBYTES - ETHER_ALIGN) { + bcopy(mp->m_data + + (MCLBYTES - ETHER_ALIGN), + &tmp_align_buf, + ETHER_ALIGN); + tmp_align_buf_len = mp->m_len - + (MCLBYTES - ETHER_ALIGN); + mp->m_len -= ETHER_ALIGN; + } + + if (mp->m_len) { + bcopy(mp->m_data, + mp->m_data + ETHER_ALIGN, + mp->m_len); + if (!adapter->align_buf_len) + mp->m_data += ETHER_ALIGN; + } + + if (adapter->align_buf_len) { + mp->m_len += adapter->align_buf_len; + bcopy(&adapter->align_buf, + mp->m_data, + adapter->align_buf_len); + } + + if (tmp_align_buf_len) + bcopy(&tmp_align_buf, + &adapter->align_buf, + tmp_align_buf_len); + adapter->align_buf_len = tmp_align_buf_len; + } +#endif /* __386__ */ + if (adapter->fmp == NULL) { - mp->m_pkthdr.len = len; + mp->m_pkthdr.len = mp->m_len; adapter->fmp = mp; /* Store the first mbuf */ adapter->lmp = mp; } else { @@ -2801,7 +2850,7 @@ } adapter->lmp->m_next = mp; adapter->lmp = adapter->lmp->m_next; - adapter->fmp->m_pkthdr.len += len; + adapter->fmp->m_pkthdr.len += mp->m_len; } if (eop) { --- if_em.h.orig Wed Nov 10 03:18:52 2004 +++ if_em.h Tue Nov 23 03:33:01 2004 @@ -347,6 +347,12 @@ u_int8_t unit; struct mtx mtx; +#ifndef __i386__ + /* Used for carrying forward alignment adjustments */ + unsigned char align_buf[ETHER_ALIGN]; /* tail of unaligned packet */ + u_int8_t align_buf_len; /* bytes in tail */ +#endif /* __i386__ */ + /* Info about the board itself */ u_int32_t part_num; u_int8_t link_active; -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem From owner-freebsd-alpha@FreeBSD.ORG Tue Nov 23 19:19:59 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22C2416A4CE for ; Tue, 23 Nov 2004 19:19:59 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE7C043D1D for ; Tue, 23 Nov 2004 19:19:58 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 23797 invoked from network); 23 Nov 2004 19:19:58 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Nov 2004 19:19:57 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iANJJnrR036800; Tue, 23 Nov 2004 14:19:54 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-alpha@FreeBSD.org Date: Tue, 23 Nov 2004 11:17:35 -0500 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411231117.35467.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Robert Watson Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 19:19:59 -0000 On Monday 22 November 2004 10:09 pm, Sten Spans wrote: > On Tue, 23 Nov 2004, Sten Spans wrote: > >> doesn't seem to print anything, but ... > >> > >> if_em.c > >> 2442 > >> 2443 /*if (ifp->if_mtu <= ETHERMTU) { */ > >> 2444 m_adj(mp, ETHER_ALIGN); > >> 2445 /*} */ > >> 2446 > >> > >> does seem to fix the crash, also trashes the performance, > >> but that's another matter. It looks like mbuf alignment is > >> needed, if_bge seems to provide reasonable examples. > > > > And looking at netbsd/openbsd clarifies the whole issue, > > > > #ifdef __STRICT_ALIGNMENT > > /* > > * The ethernet payload is not 32-bit aligned when > > * Jumbo packets are enabled, so on architectures > > with > > * strict alignment we need to shift the entire > > packet > > * ETHER_ALIGN bytes. Ugh. > > */ > > > > > > This diff probably should be merged. > > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_em.c.diff?r1=1.2 > >2&r2=1.23 > > > > Although I don't know wether freebsd has the STRICT_ALIGNMENT define. > > This is an initial patch based on the openbsd code, > which solves the if_em issue, and seems to give ok performance > ( note to self: turn off debugging when testing network performance ). > > Comments welcome. We do need some kind of __STRICT_ALIGNMENT macro I think if we don't already have one as archs other than i386 might not need the alignment. At the least there could be a block near the top of if_em.h that was: #if defined(__alpha__) #define STRICT_ALIGNMENT #endif and other architectures could be fixed by simply adding another 'defined(__foo__)' clause without having to change the ifdef and comments down in the code itself. As to the correctness of the em(4) change, hopefully Robert can speak to that. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-alpha@FreeBSD.ORG Wed Nov 24 21:48:59 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A822916A4CE for ; Wed, 24 Nov 2004 21:48:59 +0000 (GMT) Received: from neptune.atopia.net (neptune.atopia.net [209.128.231.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5047143D48 for ; Wed, 24 Nov 2004 21:48:59 +0000 (GMT) (envelope-from matt@atopia.net) Received: from www.atopia.net (localhost [127.0.0.1]) by neptune.atopia.net (Postfix) with ESMTP id B169B4144 for ; Wed, 24 Nov 2004 12:03:58 -0500 (EST) Received: from 134.210.7.179 (SquirrelMail authenticated user matt); by www.atopia.net with HTTP; Wed, 24 Nov 2004 12:03:58 -0500 (EST) Message-ID: <56213.134.210.7.179.1101315838.squirrel@134.210.7.179> Date: Wed, 24 Nov 2004 12:03:58 -0500 (EST) From: "Matt Juszczak" To: freebsd-alpha@freebsd.org User-Agent: SquirrelMail/1.5.1 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: FreeBSD Boot on a Alpha 433 X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 21:48:59 -0000 Hello, I have a personal workstation (433) Digital Alpha and when I do "boot dka0" the kernel loads off the CD (I'm trying to install BSD). It even gets passed hard drive detection but just dies with a haltcode. Any ideas? Thanks, Matt From owner-freebsd-alpha@FreeBSD.ORG Wed Nov 24 22:07:49 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C8B016A4CE for ; Wed, 24 Nov 2004 22:07:49 +0000 (GMT) Received: from smtp-vbr12.xs4all.nl (smtp-vbr12.xs4all.nl [194.109.24.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ED1643D45 for ; Wed, 24 Nov 2004 22:07:48 +0000 (GMT) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) iAOM7jht008031; Wed, 24 Nov 2004 23:07:45 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.13.1/8.12.9) with ESMTP id iAOM7jNC042320; Wed, 24 Nov 2004 23:07:45 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.13.1/8.13.1/Submit) id iAOM7jOF042319; Wed, 24 Nov 2004 23:07:45 +0100 (CET) (envelope-from wb) Date: Wed, 24 Nov 2004 23:07:45 +0100 From: Wilko Bulte To: Matt Juszczak Message-ID: <20041124220745.GA42302@freebie.xs4all.nl> References: <56213.134.210.7.179.1101315838.squirrel@134.210.7.179> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <56213.134.210.7.179.1101315838.squirrel@134.210.7.179> X-OS: FreeBSD 4.10-STABLE X-PGP: finger wilko@freebsd.org User-Agent: Mutt/1.5.6i X-Virus-Scanned: by XS4ALL Virus Scanner cc: freebsd-alpha@freebsd.org Subject: Re: FreeBSD Boot on a Alpha 433 X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 22:07:49 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 24, 2004 at 12:03:58PM -0500, Matt Juszczak wrote.. > Hello, >=20 > I have a personal workstation (433) Digital Alpha and when I do "boot dka= 0" the kernel loads off the CD (I'm trying to install BSD). It even gets p= assed hard drive detection but just dies with a haltcode. Any ideas? Some details would come in handy: - what revision FreeBSD did you try? - SHOW DEV from the >>> console prompt. - SHOW CONF from the >>> console prompt. - what is the exact haltcode etc message do you get? cheers, Wilko --=20 Wilko Bulte wilko@FreeBSD.org --envbJBWh7q8WU6mo Content-Type: application/x-pkcs7-signature Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIIOfwYJKoZIhvcNAQcCoIIOcDCCDmwCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC C+swggSmMIICjqADAgECAgMAxq4wDQYJKoZIhvcNAQEEBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkB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hkiG9w0DAgICAIAw DQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgwDQYJKoZIhvcNAQEBBQAE ggEAM21mfxHTd+b07y2n1v5KOcx9QKoRgrWO2vnDklCKeWoc9BQrMkXOS8zPioeaB4JAponz 7r25hFBuZ6Bgk8xIHy3bF1FazJLcDvNR18rAC/yNUYqleMS2ZHsAxU+g3AplJ713M9nPouxd WNxBBKe9gIvbLGXAf9g1sRLM9PuNHDhCva55nduidpaO+LJSU6cCzDSGph3cuv+2L1ymLuAC CmHP4FmcuNgqN9jxZD/A1cs388qG6XQSnHYDyBtAeHbBk8mAa8J+DittzMIaJJ37qeevI6VA EjP6xgiKguztmKm4mwbapd9Eks5FNJkWUJ+cj+RLAf98eupuxCnIMtU9gw== --envbJBWh7q8WU6mo-- From owner-freebsd-alpha@FreeBSD.ORG Sun Nov 28 00:00:53 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B61616A4CE; Sun, 28 Nov 2004 00:00:53 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E217343D41; Sun, 28 Nov 2004 00:00:02 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [192.168.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 460823E433; Sun, 28 Nov 2004 01:00:01 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id CAA9E276; Sun, 28 Nov 2004 01:00:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id BF631265; Sun, 28 Nov 2004 01:00:00 +0100 (CET) Date: Sun, 28 Nov 2004 01:00:00 +0100 (CET) From: Sten Spans To: Robert Watson , John Baldwin In-Reply-To: <200411231117.35467.jhb@FreeBSD.org> Message-ID: References: <200411231117.35467.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1101600000=:25496" cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 00:00:53 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-851401618-1101600000=:25496 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Tue, 23 Nov 2004, John Baldwin wrote: > On Monday 22 November 2004 10:09 pm, Sten Spans wrote: >> On Tue, 23 Nov 2004, Sten Spans wrote: >>>> doesn't seem to print anything, but ... >>>> >>>> if_em.c >>>> 2442 >>>> 2443 /*if (ifp->if_mtu <= ETHERMTU) { */ >>>> 2444 m_adj(mp, ETHER_ALIGN); >>>> 2445 /*} */ >>>> 2446 >>>> >>>> does seem to fix the crash, also trashes the performance, >>>> but that's another matter. It looks like mbuf alignment is >>>> needed, if_bge seems to provide reasonable examples. >>> >>> And looking at netbsd/openbsd clarifies the whole issue, >>> >>> #ifdef __STRICT_ALIGNMENT >>> /* >>> * The ethernet payload is not 32-bit aligned when >>> * Jumbo packets are enabled, so on architectures >>> with >>> * strict alignment we need to shift the entire >>> packet >>> * ETHER_ALIGN bytes. Ugh. >>> */ >>> >>> >>> This diff probably should be merged. >>> http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_em.c.diff?r1=1.2 >>> 2&r2=1.23 >>> >>> Although I don't know wether freebsd has the STRICT_ALIGNMENT define. >> >> This is an initial patch based on the openbsd code, >> which solves the if_em issue, and seems to give ok performance >> ( note to self: turn off debugging when testing network performance ). >> >> Comments welcome. > > We do need some kind of __STRICT_ALIGNMENT macro I think if we don't already > have one as archs other than i386 might not need the alignment. bge needs some fixing as well then: 2773 #ifndef __i386__ 2774 /* 2775 * The i386 allows unaligned accesses, but for other 2776 * platforms we must make sure the payload is aligned. 2777 */ 2778 if (sc->bge_rx_alignment_bug) { 2779 bcopy(m->m_data, m->m_data + ETHER_ALIGN, 2780 cur_rx->bge_len); 2781 m->m_data += ETHER_ALIGN; 2782 } 2783 #endif Not sure if this a better fix for the same problem... > At the least > there could be a block near the top of if_em.h that was: > > #if defined(__alpha__) > #define STRICT_ALIGNMENT > #endif > > and other architectures could be fixed by simply adding another > 'defined(__foo__)' clause without having to change the ifdef and comments > down in the code itself. I've attatched an updated version of the patch, with your comment included. > As to the correctness of the em(4) change, > hopefully Robert can speak to that. Have you had time to look at this robert ? -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem ---559023410-851401618-1101600000=:25496 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="if_em-alpha.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="if_em-alpha.diff" LS0tIGlmX2VtLmMub3JpZwlUdWUgTm92IDIzIDAzOjAzOjIzIDIwMDQNCisr KyBpZl9lbS5jCVN1biBOb3YgMjggMDA6NTM6NTEgMjAwNA0KQEAgLTI3ODQs OCArMjc4NCw1NyBAQA0KIAkJCS8qIEFzc2lnbiBjb3JyZWN0IGxlbmd0aCB0 byB0aGUgY3VycmVudCBmcmFnbWVudCAqLw0KIAkJCW1wLT5tX2xlbiA9IGxl bjsNCiANCisjaWZuZGVmIF9fU1RSSUNUX0FMSUdOTUVOVA0KKwkJCS8qDQor CQkJICogVGhlIGV0aGVybmV0IHBheWxvYWQgaXMgbm90IDMyLWJpdCBhbGln bmVkIHdoZW4NCisJCQkgKiBKdW1ibyBwYWNrZXRzIGFyZSBlbmFibGVkLCBz byBvbiBhcmNoaXRlY3R1cmVzIHdpdGgNCisJCQk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