Subject: Re: atrocious tx performance of gigabit cardbus re(4)
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 09/25/2007 14:32:32
On Tue, Sep 25, 2007 at 02:22:23PM -0500, Jonathan A. Kollasch wrote:
> On Mon, Sep 24, 2007 at 11:35:50AM -0500, David Young wrote:
> > On Mon, Sep 24, 2007 at 11:24:01AM -0500, Jonathan A. Kollasch wrote:
> > > Hi,
> > > 
> > > I've got a Netgear GA511 (Gigabit CardBus re(4)). I recently got
> > > .......
> > > me.
> > 
> > Hi Jonathan,
> > 
> > I have some patches that may help.  The problem is that NetBSD does not
> > enable read bursts on the PCI side of the bridge, so the bridge does
> > single-cycle transactions on the NIC's behalf.  What does dmesg say
> > about your cbb(4) ?
> >
> 
> Nothing unusual AFAICT:
> 
> The 4.99.22 on a Toshiba A135-S4527:
> 
> cbb0 at pci4 dev 4 function 0: Texas Instruments product 0x8039 (rev. 0x00)
> ... (other functions of the chip: 1394, media card reader, sdhci)
> cbb0: interrupting at ioapic0 pin 16 (irq 255)
> cardslot0 at cbb0 slot 0 flags 0
> cardbus0 at cardslot0: bus 5
> pcmcia0 at cardslot0
> 
> The other box (Compaq M2005US) is essentially the same,
> but the product ID is recognized. ("PCI7x21/7x11 ...")
> 
> The actual chip is marked PCI7411 in the Compaq,
> I've not opened the Toshiba.
> 
> <long pause>
> 
> I took the liberty of testing your patch from
> http://mail-index.netbsd.org/current-users/2007/08/10/0004.html
> (well, not the patch itself, just unconditionally setting the bits).
> TX performance on the Compaq (1.3GHz Celeron Dothan) increased to
> about 16Mbytes/s. RX increased some too.

That's good news!

It may be possible to get even higher performance by tweaking parameters
both on the bridge and on the NIC.  For example, the latency timer on the
primary (PCI) bus may be rather small.  On the NIC, both the PCI latency
timer and the DMA burst parameters (highly NIC-specific) may be too small.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933 ext 24