tx checksumming result

Pete Wyckoff pw@dancer.ca.sandia.gov
Thu Mar 25 17:44:00 1999


I finished the transmit checksum support for hamachi, but don't get
your hopes up, performance-wise.  It required a generic-ish patch to
the kernel so that the higher-level TCP routines would know not to
bother checksumming the data as they copy it out of user space.  The
change doesn't affect drivers which don't set the dev->hw_tx_checksum
field indicating they can do it.  But anything that uses struct device
needs to be recompiled.

Both TCP and UDP (non-fragmented) packets are checksummed in hardware.
The kernel computes the pseudo and passes it down to the driver in
skb->csum instead of the actual checksum.

One complication in the particular hamachi implementation is that the
hard_header length must be bumped up by 8 bytes so there's space in
front of the packet to tack on the checksum control information.  The
card strips this off and sticks the checksummed packet onto the wire.
And the hard_header isn't symmetric:  there's not an extra 8 bytes on
the receive side header.  But a couple of ethernet-standard routines
assume that dev->hard_header_len is ETH_ALEN regardless of the actual
value set by the driver.  So I pulled some of this functionality into
the driver itself:  eth_type_trans and eth_header.

I was hard pressed to find a set of bandwidth test parameters which
would show interesting improvement under TX checksumming.  Maybe 5% at
most, but that's pretty close to the error bars.  The RX checksumming
has a much bigger impact.  Both TxIntrCtrl and RxIntrCtrl remain important
tuning parameters as well.  I did all these tests on 433 MHz alpha EV56
machines; maybe slower processors would notice more improvement.

The PAWS bad packets I complained about earlier turned out to be the
failure of the card to report packets which had successfully been
transmitted in time to stop the TCP stack from fast-retransmitting them,
thinking they'd been lost.  It's easy enough to stop by playing with the
interrupt control values, but creates a tug-of-war between minimizing
these duplicates and minimizing the interrupt frequency.

Some patches are at http://dancer.ca.sandia.gov/~pw.

		-- Pete

---------------------------------------------
Pete Wyckoff          | wyckoff@ca.sandia.gov
Sandia National Labs  | 925 294 3503 (voice)
MS 9011, P.O. Box 969 | 925 294 1225 (fax)
Livermore, CA  94551  |
 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.