From owner-freebsd-stable@FreeBSD.ORG Fri Mar 28 01:39:36 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E4A21065676 for ; Fri, 28 Mar 2008 01:39:36 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 908E08FC20 for ; Fri, 28 Mar 2008 01:39:35 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so8351fgg.35 for ; Thu, 27 Mar 2008 18:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=jMEKWDzYFyDOy6vrer6XAueQ0aGaPYTrPBz7J5NcQcg=; b=cE+xWdtw7UVrFNWjYNpRQ37wwgbhVJLVUowp5CU/jDOTAZCmMINaTMOIoHCaujIWan9F7FQoXsBQdQN5CS9Qgt1DVdQOeZ0e16Ow4xdPznh6PtAEBXE70bHesQbyr66cGNi7WRZoeM3p7zk1pyuQK3MjRGJaJoquQh67gy93Ans= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=OcOClNrSUGprjpQlUEt0cHL5PPEwu4Mmm9bvTq9GJyq+60Z2hlCHUEBCqaCzahPkkxndvnWmX5iczJtYFFfFt6eMcYYmGBUaX65o90Z+2l+7ZIMV6UYx5t+ETf5BF8EPSE221XqF4bGZmXRARA01tWqxIPSHePcU8Fretff/PCE= Received: by 10.82.146.10 with SMTP id t10mr5278165bud.6.1206668374015; Thu, 27 Mar 2008 18:39:34 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id o11sm609535fkf.9.2008.03.27.18.39.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Mar 2008 18:39:32 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m2S1dPLC098536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Mar 2008 10:39:25 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m2S1dNDk098535; Fri, 28 Mar 2008 10:39:23 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 28 Mar 2008 10:39:23 +0900 From: Pyun YongHyeon To: Abdullah Ibn Hamad Al-Marri Message-ID: <20080328013923.GC98450@cdnetworks.co.kr> References: <626860.36996.qm@web33702.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <626860.36996.qm@web33702.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i Cc: Ian FREISLICH , FreeBSD STABLE , FreeBSD Current Subject: Re: Packet corruption in re0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2008 01:39:36 -0000 On Thu, Mar 27, 2008 at 10:41:48AM -0700, Abdullah Ibn Hamad Al-Marri wrote: > ----- Original Message ---- > > From: Pyun YongHyeon > > To: Ian FREISLICH > > Cc: FreeBSD Current ; Robert Backhaus > > Sent: Monday, March 17, 2008 8:12:03 AM > > Subject: Re: Packet corruption in re0 > > > > On Fri, Feb 22, 2008 at 10:43:22AM +0200, Ian FREISLICH wrote: > > > Pyun YongHyeon wrote: > > > > On Thu, Feb 21, 2008 at 01:18:18PM +0200, Ian FREISLICH wrote: > > > > > Pyun YongHyeon wrote: > > > > > > On Thu, Feb 21, 2008 at 02:47:43PM +1000, Robert Backhaus wrote: > > > > > > > On Thu, Feb 21, 2008 at 1:50 PM, Pyun YongHyeon > > wr > > > ote: > > > > > > > > On Thu, Feb 21, 2008 at 11:03:02AM +1000, Robert Backhaus wrote: > > > > > > > > > I am experiencing roughly 15% packet corruption on the re > > inter > > > face > > > > > on > > > > > > > > > my freebsd 7/amd64 box. > > > > > > > > > > > > > > > > > > FreeBSD gw.flexi.robbak.com 7.0-PRERELEASE FreeBSD > > 7.0-PRERELEA > > > SE #8 > > > > > : > > > > > > > > > Tue Feb 5 09:49:55 EST 2008 > > > > > > > > > root@gw.flexi.robbak.com:/usr/obj/usr/src/sys/GW amd64 > > > > > > > > > > > > > > > > > > Just to make troubleshooting difficult, this problem only > > shows > > > up > > > > > > > > > after the system has been up for roughly 36 hours, depending > > on > > > the > > > > > > > > > amount of traffic. > > > > > > > > > > > > > > > > > > > > > > > > > I didn't take a look attached tcpdump files but I guess the > > > > > > > > instability issue was fixed in HEAD. It's not yet MFCed but > > > > > > > > I'll handle it in a week. > > > > > > > > > > > > > > > > Would you try re(4) in HEAD? > > > > > > > > > > > > > > > > > > > > > > OK, I'll do that. What is the best way to do that? csupping to "." > > se > > > ems a > > > > > > > bit drastic, and I don't do much with cvs proper. I take it that I > > sh > > > ould > > > > > use > > > > > > > anon-cvs to grab the directory, but I don't quite know how. > > > > > > > > > > > > > > > > > > > Copy sys/dev/re/if_re.c, sys/pci/if_rlreg.h in HEAD to your box. > > > > > > Due to lack of m_defrag(9) in 7-PRERELEASE/RC, you also have to add > > > > > > that function to if_re.c(Copy m_defrag() in sys/kern/uipc_mbuf.c on > > > > > > HEAD/RELENG_7 to if_re.c). That would make it build on your box. > > > > > > > > > > This doesn't solve the problem that I'm seeing on re(4) interfaces. > > > > > It basically shows up as quagga establishing OSPF neighours as > > > > > "Exchange/DR" when VLAN hardware tagging is enabled. I'm running > > > > > OSPF over 802.1Q vlans. Neighbours are correctly negotiated once > > > > > VLAN hardware tagging is disabled on the interface. > > > > > > > > > > I'll do more debugging. > > > > > > > > > > > > > Hmm. That sounds like different issue to me. I guess I din't change > > > > any semantics in VLAN H/W tagging. Do you still the same VLAN H/W > > > > tagging related issues on RELENG_7? > > > > > > > > To narrow down the issue it would be even better to know which parts > > > > of H/W assistance was broken. For example, > > > > - Disable checksum offload for VLAN interface first and check > > > > whether quagga works. > > > > > > You can only disable offload on the parent interface. > > > > > > > - Disable checksum offload for parent interface and check again. > > > > If you can post tcpdump output for broken conntection it may help a > > > > lot to diagnose the issue. > > > > > > The only flag affecting this behaviour is vlanhwtag. Various > > > permutations of the interface flags make no difference to this > > > behaviour as long as hardware tagging is enabled. > > > > > > It seems like it's corrupting large packets on transmit when vlanhwtag > > > is enabled. From the tcpdump output it looks like a padding or > > > packet length issue. > > > > > > Here's what tcpdump on the re(4) device thinks it's transmitting: > > > > > > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype 802.1Q (0x8100), length > > 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.92 > 196.22.138.89: OSPFv2, > > Database Description, length: 1472 > > > > > > Here's what was actually recieved by the em(4) device on the > > > neighbour. Note the absense of the 801.1Q header: > > > > > > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype IPv4 (0x0800), length 1506: > > 196.22.138.92 > 196.22.138.89: OSPFv2, Database Description, length: 1472 > > > > > > When vlanhwtagging is disabled, the re(4) device transmits: > > > > > > 00:90:fb:0c:89:7d > 00:08:a1:3c:32:9c, ethertype 802.1Q (0x8100), length > > 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.89 > 196.22.138.92: OSPFv2, > > Database Description, length: 1472 > > > > > > and the em(4) device recieves: > > > > > > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype 802.1Q (0x8100), length > > 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.92 > 196.22.138.89: OSPFv2, > > Database Description, length: 1472 > > > > > > Let me know if you need more detailed tcpdump output than I've provided. > > > > > > > I guess I've found a VLAN hardware tagging bug in re(4). > > Please try this one and let me know the result. > > http://people.freebsd.org/~yongari/re/if_re.c > > http://people.freebsd.org/~yongari/re/if_rlreg.h > > > > > Ian > > > > > > -- > > > Ian Freislich > > > > > > > -- > > Regards, > > Pyun YongHyeon > > > Pyun, > > I used it, and I got no bufer space available message, I run a server with heavey http requests and named as we.. > > so I had to increase the buffer. > Please try re(4) in HEAD. I've just committed one important fix to PCIe variants of RealTek chip. I guess re(4) in HEAD shall fix all known issues reported. > www# netstat -m > 553/1862/2415 mbufs in use (current/cache/total) > 279/1007/1286/65536 mbuf clusters in use (current/cache/total/max) > 279/768 mbuf+clusters out of packet secondary zone in use (current/cache) > 56/812/868/12800 4k (page size) jumbo clusters in use (current/cache/total/max) > 0/0/0/6400 9k jumbo clusters in use (current/cache/total/max) > 0/0/0/3200 16k jumbo clusters in use (current/cache/total/max) > 920K/5727K/6647K bytes allocated to network (current/cache/total) > 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for jumbo clusters denied (4k/9k/16k) > 0/0/0 sfbufs in use (current/peak/max) > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 41261 requests for I/O initiated by sendfile > 0 calls to protocol drain routines > > Can you make a patch for the changes you made in HEAD for RELENG_7? > I'll MFC re(4) changes in a week. -- Regards, Pyun YongHyeon