From owner-freebsd-net@FreeBSD.ORG Wed Apr 16 18:20:35 2008 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 A46471065677 for ; Wed, 16 Apr 2008 18:20:35 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E10A8FC16 for ; Wed, 16 Apr 2008 18:20:35 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so1436585ywt.13 for ; Wed, 16 Apr 2008 11:20:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=gWce5972bEgiQU0Qe0OxMbA8rvfNAm3oVFyxzVaPFIs=; b=iAUmo1iSjg/sFIwharPCZkD4hVnlne4H5qYV9arouVxiFWL/Ohe/PWCgl/r+eshjoPzaaYoNRwsT1wgVJ1KCuRpbRmmWk0O7xpCYhx1AetU7DHoX9rUPqEjWjbY6IiJ+lTDrLNlIHXhLp0apTJzaDIs+qsUoPNf0AQH4d0BxJ54= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UKKeh78Hy0q3aWAULJgqcdI/fvsKtw/151AmO4oV/EvssU+tcxhdpLXZ9onS0Bu+fE/ByyRznmIsZP3w8YsQA3ewwLcsX8GDmE2OLwYy1Pi1k2lG0w2wX5Y2lvp0Mst4YnbKQdtYSIEU9/GTCWMIUqrKo+70CKn/89J5H9OcYuQ= Received: by 10.151.85.20 with SMTP id n20mr553514ybl.28.1208370027256; Wed, 16 Apr 2008 11:20:27 -0700 (PDT) Received: by 10.151.15.21 with HTTP; Wed, 16 Apr 2008 11:20:27 -0700 (PDT) Message-ID: <3c0b01820804161120udb54ab3tea4bf7baade0061f@mail.gmail.com> Date: Wed, 16 Apr 2008 14:20:27 -0400 From: "Alexander Sack" To: Dieter In-Reply-To: <200804161732.RAA23071@sopwith.solgatos.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820804160929i76cc04fdy975929e2a04c0368@mail.gmail.com> <200804161732.RAA23071@sopwith.solgatos.com> Cc: freebsd-net@freebsd.org, freebsd-drivers@freebsd.org, Jung-uk Kim , freebsd-hackers@freebsd.org Subject: Re: bge dropping packets issue 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: Wed, 16 Apr 2008 18:20:35 -0000 Dieter: Thanks, at 20Mbps! That's pretty aweful. JK: Thanks again. Wow, I searched the list and didn't see much discussion with respect to bge and packet loss! I will try the rest of that patch including pushing the TCP receive buffer up (though I don't think that's going to help in this case). The above is based on just looking at code.... I guess some follow-up questions would be: 1) Why isn't BGE_SSLOTS tunable (to a point)? Why can't that be added the driver? I noticed that CURRENT has added a lot more SYSCTL information. Moreover it seems the Linux driver can set it up to 1024. 2) bge_tick() uses the same global mutex for its callout as the rest of the driver. Moreover, it really doesn't have to hold it while updating statistics, they are reads of volatile registers anyway (blocking the ISR doesn't prevent the firmware from updating its stat struct). Would there be any interest in using a separate mutex for the callout itself and then just hold the lock for the other small calls (bge_asf_driver_up(), bge_watchdog())? I'm experimenting with right now just dropping the BGE mutex around the bge_stats_update() calls to give more time to bge_rxeof() to drain rx_bd's. I admit that bge_tick doesn't do a whole lot but it seems this driver is very sensitive to resource starvation and I'm trying to get the BGE driver to drain as much rx_bd's as possible to avoid drops due to the firmware having no place to put them! 3) How does interrupt non-DEVICE_POLLING perform? Thanks guys! -aps On Wed, Apr 16, 2008 at 5:32 AM, Dieter wrote: > > I'm investigating an issue we are seeing with 6.1-RELEASE and the bge > > driver dropping packets sporadically at 100MBps speed. > > > > Its get mainly aggravated when heavy disk I/O occurs > > > > Has anyone seen this problem before with bge? Am I barking up the > > wrong tree with my initial investigation? Does anyone know if its > > even possible to achieve 100% packet capture with bge at its supported > > speeds (10/100/1000)? > > I had a similar problem with bge and 6.0-RELEASE. Bge works great for > me in 6.2-RELEASE. So far 7.0-RELEASE looks good as well (bge-wise, > I do have unresolved issues with 7). > > My app is TCP, cranking the TCP receive buffer way up helped, as did > turning off Nagle. > > My bge is 1000, but connected at 100 since that is what the other end is. > I saw problems at less than 20 Mbps. > > There is still a problem that other drivers can lock out bge for too long. > For example kern/118093: firewire bus reset. >