From owner-freebsd-net@FreeBSD.ORG Wed Dec 7 01:00:13 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AED8106564A for ; Wed, 7 Dec 2011 01:00:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 210098FC12 for ; Wed, 7 Dec 2011 01:00:11 +0000 (UTC) Received: by iafi7 with SMTP id i7so49387iaf.13 for ; Tue, 06 Dec 2011 17:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=w/0NkxtMR4DuGd6eEdsF/Or1OJ8dHZofTQ0XaEqiMiI=; b=k3Rr4pa6kIIg2nh0SeQLflSNh5sSL7GhmBJMh7anI9/S0wvUMzbrYSG/zy3wbSbfHD 5zMKfxq56KVfs+FvI34iw4R7NB2uH+fERrJBu++B5Wr5K/1GO+/3H9HtMibf9LFfaKKc TD9Epevj8dbsbKVUE3wNwglchlsSDZpYXiiOk= Received: by 10.231.45.205 with SMTP id g13mr3969803ibf.8.1323219611476; Tue, 06 Dec 2011 17:00:11 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id l28sm101093ibc.3.2011.12.06.17.00.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Dec 2011 17:00:10 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 06 Dec 2011 16:59:58 -0800 From: YongHyeon PYUN Date: Tue, 6 Dec 2011 16:59:58 -0800 To: Sami Halabi Message-ID: <20111207005958.GE5825@michelle.cdnetworks.com> References: <20111205022730.GE1729@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Problem on re0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 01:00:13 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 05, 2011 at 01:53:03PM +0200, Sami Halabi wrote: > Hi, > Dmesg: > > re0: port > 0x9000-0x90ff mem 0xf4000000-0xf40000ff irq 16 at device 6.0 on pci1 > re0: Chip rev. 0x10000000 > re0: MAC rev. 0x00000000 > miibus0: on re0 > rgephy0: PHY 1 on miibus0 > rgephy0: 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, > 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, > 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, > auto-flow > re0: Ethernet address: 00:a1:b0:69:15:5d > re0: [FILTER] > re1: port > 0x9400-0x94ff mem 0xf4001000-0xf40010ff irq 17 at device 7.0 on pci1 > re1: Chip rev. 0x10000000 > re1: MAC rev. 0x00000000 > miibus1: on re1 > rgephy1: PHY 1 on miibus1 > rgephy1: 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, > 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, > 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, > auto-flow > re1: Ethernet address: 00:a1:b0:69:76:28 > re1: [FILTER] > Thanks for the info. > ------------------------------------------------ > here is "sysctl dev.re.0.stats=1" output: > Dec 5 14:58:27 mpd kernel: re0 statistics: > Dec 5 14:58:27 mpd kernel: Tx frames : 15790052 > Dec 5 14:58:27 mpd kernel: Rx frames : 11847483 > Dec 5 14:58:27 mpd kernel: Tx errors : 0 > Dec 5 14:58:27 mpd kernel: Rx errors : 10378 > Dec 5 14:58:27 mpd kernel: Rx missed frames : 0 > Dec 5 14:58:27 mpd kernel: Rx frame alignment errs : 0 > Dec 5 14:58:27 mpd kernel: Tx single collisions : 0 > Dec 5 14:58:27 mpd kernel: Tx multiple collisions : 0 > Dec 5 14:58:27 mpd kernel: Rx unicast frames : 11847483 > Dec 5 14:58:27 mpd kernel: Rx broadcast frames : 0 > Dec 5 14:58:27 mpd kernel: Rx multicast frames : 0 > Dec 5 14:58:27 mpd kernel: Tx aborts : 0 > Dec 5 14:58:27 mpd kernel: Tx underruns : 0 The MAC statistics do not show detailed information for RX errors. :-( > > here is current netstat: > Name Mtu Network Address Ipkts Ierrs Idrop Ibytes > Opkts Oerrs Obytes Coll > re0 1500 00:a1:b0:69:15:5d 294056550 280 0 > 86154803011 420449814 0 350472123744 0 Because driver updated if_ierrors counter, could you apply attached patch and let me know what values can you see on your console? > 01:00:5e:00:00:01 261 > 0 > re0 1500 188.64.96.4/3 5.1886496.royalsh 435 - - 35076 > 420439431 - 344585787536 - > re1* 1500 00:a1:b0:69:76:28 0 0 0 0 > 0 0 0 0 > > i had in the last 36 hours 7 time card stuck and ifconfig down/up... > > >When you notice the controller is in stuck condition, could you > >check which part(either TX or RX or both) of controller does not > >work? > how i can output that? > There is no knob to know that. You should be able to send some packets from the box when you know the controller is in stuck condition which may not be available option if the box is not on your desk. If you can access the box when its network is in stuck condition, try sending ICMP ECHO requests from re(4) host to other box in the LAN. And use tcpdum on the other box to know whether it can see the packets. If you can see ICMP ECHO requests, this means TX still works. For RX, send some packets to re(4) host and see whether re(4) can see these packets. --ReaqsoxgOBHFXBhH Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="re.rxstat.diff" Index: if_re.c =================================================================== --- if_re.c (revision 228311) +++ if_re.c (working copy) @@ -2183,6 +2183,9 @@ (rxstat & RL_RDESC_STAT_ERRS) == RL_RDESC_STAT_GIANT) rxerr = 0; if (rxerr != 0) { +#if 1 + printf("%#x ", rxstat); +#endif ifp->if_ierrors++; /* * If this is part of a multi-fragment packet, --ReaqsoxgOBHFXBhH--