From owner-freebsd-net@FreeBSD.ORG Wed Apr 16 21:02:51 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 204381065672 for ; Wed, 16 Apr 2008 21:02:51 +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 C50328FC1C for ; Wed, 16 Apr 2008 21:02:50 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so1478664ywt.13 for ; Wed, 16 Apr 2008 14:02:41 -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=lhVYVm/nOf67r1ycOYqufFvL7lLRXK5Mn4GnJ2BZqUU=; b=DVLlLcgOzknaEnQKPpTqjCgxEeJYvLokeweM6jUy3lqRhiYBIBzMEsqn3PcndE6BzzD4PbHCa/nez0QPQWz+xDfAoB7Xevd0mtJgec5YBSY22i5wTGT072JfpPMoAH5A1I0UHe6WUEGQ+JeG93GxQy+1GS5GYR8V3AnVt89Cae8= 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=H3zT6RpB0XkcgFsywoOz/WCTIsb6J1QE/AW1t6M95vNrv7rnwjwOZPGgQ8GwsfhaSP8I1P5rqepYeTanEcpCwJTijoDF4gZyWVM4XIB6C/nNFWvHxf9HOpbqX8wIOcigPvTKL4HtvWxprR2l7H8rcgAfLkOEKtcqEAXZuJsSttQ= Received: by 10.151.114.9 with SMTP id r9mr714069ybm.238.1208379761398; Wed, 16 Apr 2008 14:02:41 -0700 (PDT) Received: by 10.151.15.21 with HTTP; Wed, 16 Apr 2008 14:02:41 -0700 (PDT) Message-ID: <3c0b01820804161402u3aac4425n41172294ad33a667@mail.gmail.com> Date: Wed, 16 Apr 2008 17:02:41 -0400 From: "Alexander Sack" To: "Jung-uk Kim" In-Reply-To: <200804161654.22452.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820804160929i76cc04fdy975929e2a04c0368@mail.gmail.com> <200804161456.20823.jkim@FreeBSD.org> <3c0b01820804161328m77704ca0g43077a9718d446d4@mail.gmail.com> <200804161654.22452.jkim@FreeBSD.org> Cc: freebsd-net@freebsd.org, Dieter 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 21:02:51 -0000 On Wed, Apr 16, 2008 at 4:54 PM, Jung-uk Kim wrote: > On Wednesday 16 April 2008 04:28 pm, Alexander Sack wrote: > > On Wed, Apr 16, 2008 at 2:56 PM, Jung-uk Kim > wrote: > > > [CC trimmed] > > > > > > On Wednesday 16 April 2008 02:20 pm, Alexander Sack wrote: > > > > 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. > > > > > > IIRC, Linux tg3 uses one ring for both standard and jumbo. > > > > I'm talking about the number of slots within the ring not the > > number of RX queues. > > > > I believe the bnx4 driver (thought the tg stuff was deprecated??) > > uses 4 rings (one for each port perhaps) and reads hardware > > register at ISR time to flip between them. > > I guess you are reading wrong source, i.e., bnx4(?) is NetXtreme II > driver, which totally different family. We support them with bce(4). > tg3 is still official Linux driver. You are correct, I got the names confused (this problem really stinks)! However, my point still stands: #define TG3_RX_RCB_RING_SIZE(tp) ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ? 512 : 1024) Even the Linux driver uses higher number of RX descriptors than FreeBSD's static 256. I think minimally making this tunable is a fair approach. If not, no biggie, but I think its worth it. -aps