From owner-freebsd-current@FreeBSD.ORG Wed Oct 24 17:20:34 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C387E16A41A for ; Wed, 24 Oct 2007 17:20:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 8098213C48A for ; Wed, 24 Oct 2007 17:20:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l9OHKRsk025496; Wed, 24 Oct 2007 13:20:27 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Steve Kargl Date: Wed, 24 Oct 2007 13:19:49 -0400 User-Agent: KMail/1.6.2 References: <4712A4A8.7080503@FreeBSD.org> <200710241142.58329.jkim@FreeBSD.org> <20071024162316.GA7625@troutmask.apl.washington.edu> In-Reply-To: <20071024162316.GA7625@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200710241320.25092.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.90.2/4590/Wed Oct 24 11:20:13 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.org, JoaoBR Subject: Re: panic in 8-CURRENT / BGE hang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 17:20:34 -0000 On Wednesday 24 October 2007 12:23 pm, Steve Kargl wrote: > On Wed, Oct 24, 2007 at 11:42:55AM -0400, Jung-uk Kim wrote: > > On Wednesday 24 October 2007 02:50 am, JoaoBR wrote: > > > so that is the reason then that bge hangs with 7 with the same > > > if_bge.c version as releng_6 > > > > > > because hw.bge.allow_asf defaults to 0 in releng_6 and to 1 in > > > 7 > > > > > > somebody knows why this changed? Would be kind of handy if this > > > where in the man page since almost all tyans and other server > > > boards have this bge nics > > > > When I MFC'd bge(4) on RELENG_6, I decided to turn it off by > > default. See the diff between RELENG_6 and MFC point: > > > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bge/if_bge.c.di > >ff?r2=1.91.2.21;r1=1.186 > > > > Since RELENG_7 is branched, I think we should do the same on the > > branch as well. > > So, what exactly does hw.bge.allow_asf do? I've been running > -current on several different tyan boards with on-board bge > devices for the last few years without a hanging problem. > I just checked and found hw.bge.allow_asf=1. Basically it makes it work better with some IPMI modules (e.g., server management daughter cards). While it works on some platforms, it breaks some, i.e., it is very sensitive to firmware and BIOS. > I do see the infamous "bge0 watchdog timeout" problem, which can > be mitigatedi, but not eliminated, byx > > Index: bge/if_bge.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v > retrieving revision 1.198 > diff -u -p -r1.198 if_bge.c > --- bge/if_bge.c 30 Sep 2007 11:05:14 -0000 1.198 > +++ bge/if_bge.c 24 Oct 2007 16:26:41 -0000 > @@ -2454,9 +2454,9 @@ bge_attach(device_t dev) > /* Set default tuneable values. */ > sc->bge_stat_ticks = BGE_TICKS_PER_SEC; > sc->bge_rx_coal_ticks = 150; > - sc->bge_tx_coal_ticks = 150; > - sc->bge_rx_max_coal_bds = 10; > - sc->bge_tx_max_coal_bds = 10; > + sc->bge_tx_coal_ticks = 1500000; > + sc->bge_rx_max_coal_bds = 32; > + sc->bge_tx_max_coal_bds = 300; > > /* Set up ifnet structure */ > ifp = sc->bge_ifp = if_alloc(IFT_ETHER); > Index: bge/if_bgereg.h > =================================================================== > RCS file: /home/ncvs/src/sys/dev/bge/if_bgereg.h,v > retrieving revision 1.73 > diff -u -p -r1.73 if_bgereg.h > --- bge/if_bgereg.h 22 May 2007 19:22:58 -0000 1.73 > +++ bge/if_bgereg.h 24 Oct 2007 16:26:42 -0000 > @@ -2342,7 +2342,7 @@ struct bge_gib { > * allocated for the standard, mini and jumbo receive rings. > */ > > -#define BGE_SSLOTS 256 > +#define BGE_SSLOTS 512 > #define BGE_MSLOTS 256 > #define BGE_JSLOTS 384 That is a separate issue. scottl changed default bge_{r,t}x_max_coal_bds in rev. 1.159 with support for 575x/578x chips. I don't know why it was necessary but I believe he had his reasons. bge_tx_coal_ticks and BGE_SSLOTS never changed from rev. 1.1. Unfortunately there are too many BCM57xx variants in the world and we don't have any documentation to verify sanity of these tunables. Although I am quite sure the numbers were chosen by wpaul from draft specification for BCM570x, I agree that they may not applicable to modern BCM57xx chips any more. Probably we can make them real tunables (short-term solution) or auto-tune them (long-term solution). Jung-uk Kim