Discussion:
Disabling UDP checksums on HME
(too old to reply)
Julian Coleman
2009-05-07 09:56:31 UTC
Permalink
Hi,

Looking at:

http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6587521

and related bugs, sun ethernet cards have a UDP checksum bug where a
checksum of 0x0000 is not converted to 0xffff.

So, it looks like we should disable UDP checksums for hme(4) and also
calculate software checksums when the packet length is less than 64
bytes.

UDP checksums are already disabled on gem(4) and we don't (yet) have
drivers for Sun's ce (Cassini) and nxge (Neptune) cards.

Thanks,

J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2009-05-07 11:41:36 UTC
Permalink
Post by Julian Coleman
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6587521
and related bugs, sun ethernet cards have a UDP checksum bug where a
checksum of 0x0000 is not converted to 0xffff.
So, it looks like we should disable UDP checksums for hme(4)
I guess disabling only udp4csum-tx is enough.
Post by Julian Coleman
and also
calculate software checksums when the packet length is less than 64
bytes.
I think you are talking about bug #6587521
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6587116
but it doesn't mention how badly the hardware calculates sums.

I wonder if manual padding can help it or not, but
I can't reproduce UDP packets with wrong cksum
on quick tests with PCI hme(4).
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2009-05-07 12:35:47 UTC
Permalink
Post by Izumi Tsutsui
Post by Julian Coleman
So, it looks like we should disable UDP checksums for hme(4)
I guess disabling only udp4csum-tx is enough.
It's not clear from their bug report. I thought that the same hardware
routine would be used for both transmit and receive.
IIUC, a dumb check sum is okay on RX.

On TX, the UDP protocols requires a tweak, i.e. if the result
becomes 0x0000 (+0), it should be replaced with 0xffff (-0)
because 0x0000 in cksum field has some special meanings
(no checksum on UDPv4). On the other hand, TCP doesn't
require it (0x0000 is a valid sum).

On RX, we have to check whole a sum of packets including
a value in the cksum field, so no tweaks on it even on UDP.
(hardware doesn't modify the cksum field in a RX packet
but just provides a dumb sum value, I think)
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...