Subject: Re: netbsd: rtk0: unable to allocate Rx cluster
To: Matthias Scheler <tron@zhadum.org.uk>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: netbsd-users
Date: 10/13/2006 12:27:04
On Fri, Oct 13, 2006 at 03:51:39PM +0100, Matthias Scheler wrote:
> On Fri, Oct 13, 2006 at 03:56:57PM +0200, Christian Biere wrote:
> > He claims certain models are, not RealTek in general.
> 
> The "evil cards" are the ones which are driven by rtk(4) like the one
> mentioned here. In my opinion cards driven by re(4) aren't much better.
> They are considerably slower than other Gigabit ethernet cards and
> require more CPU power.

Why do you believe this to be the case?  The chips driven by re(4) have
checksum and segmentation offload and a reasonably sane DMA descriptor
format.  I don't see anything about their design that suggests that they
should inherently be slower nor require more CPU power than other gigabit
parts.

On the other hand, I think they all have a 32-bit bus interface, which in
practice does slow things down.  But I have a load generator which is a
1.5GHz Athlon, running Xen, with four NetBSD domains each with access to
one PCI device -- a network card.  Three of the domains can access 'wm'
cards; one gets an 're' since that was all I could find at the store when
I had to add the fourth emulated host.

The 'wm' cards are the older PCI-X cards targeted at servers and clearly
have more onboard buffering than the 're', so they can deal with a busy
PCI bus better.  With all four cards running flat-out, I see about
650Mbit/sec from them, and about 590Mbit/sec from the 're'.  If I test
with one card at a time, the performance of the cards is almost the same.

The one major issue with re(4) is that checksum offload is broken on some
revisions of some of the supported chips.  Without checksum offload we
also can't do TSO so performance drops.  Supposedly the list of broken
chips is known and can be worked-around just as it is in the wm and bge
drivers for the versions of those chips which have broken offload.

The three really cheap gigabit adapters out there right now are the
Marvell (sk/msk), the Realtek (re), and the low-end, cut-down versions
of the Intel part (wm).  Of those choices, the Marvell probably offers
the best performance because it's got a superior bus architecture and
a little more onboard buffering, but our driver is not really up to
scratch yet.  This leaves wm or re options if you need a cheap add-in
card, and I am not convinced that the low-end wm parts are really any
better than the re ones.

Thor