From owner-freebsd-net@FreeBSD.ORG Sat Dec 30 19:30:22 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AA0F16A416; Sat, 30 Dec 2006 19:30:22 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id 3325C13C442; Sat, 30 Dec 2006 19:30:22 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 7E7E910D362; Sun, 31 Dec 2006 06:28:48 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 1839427404; Sun, 31 Dec 2006 06:28:48 +1100 (EST) Date: Sun, 31 Dec 2006 06:28:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Doug Barton In-Reply-To: <20061230233343.U745@epsplex.bde.org> Message-ID: <20061231061903.J47883@delplex.bde.org> References: <457F0C35.3020409@FreeBSD.org> <20061213135817.P1190@delplex.bde.org> <20061230233343.U745@epsplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: oleg@freebsd.org, net@freebsd.org Subject: Re: [Fwd: Re: bge Ierr rate increase from 5.3R -> 6.1R] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 19:30:22 -0000 On Sun, 31 Dec 2006, Bruce Evans wrote: > [cc changed from developers to net] > > On Wed, 13 Dec 2006, Bruce Evans wrote: > >> On Tue, 12 Dec 2006, Doug Barton wrote: >> >>> This guy's first message about this problem was very detailed, and he >>> seems highly motivated. Anyone want to help him out? >> >> This might be because bge now actually reports error statistics correctly >> (so the larger counts are correct, or because the fixes in -current >> aren't all in RELENG_6 (so the larger and smaller counts may both be >> incorrect). > > I now think that this is a bug in mii (brgphy_service()) introduced > or enlarged since FreeBSD-5.early. Under loads that can be handled, > my 5701 often gets a small number of input errors every second, and > returning immediately from brgphy_service() fixes these. bge uses the > same logic as most NIC drivers for mii_tick(), and this is bad for > interrupt latency, but the problem here seems to be mangling of packets > and unrelated to interrupt latency (high loads just usually give a > packet in flight for brgphy_service() to mangle?). More debugging showed that almost any of the reads of the phy in mii cause an input error, and the problem is apparently not present in FreeBSD-5.early because a bug maintaining sc->bge_link causes mii_tick() to almost never be called. The bug seems to have been fixed in if_bge.c 1.102. FreeBSD-5.early also seems to negotiate the link a bit faster than -current, but still too slowly. Bruce