[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Disabling UDP checksums on HME
> 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).
I have done some tests to try and replicate the bad checksum with short
packets. I am also unable to replicate it. However, that still leaves
the case where the checksum result is 0x0000.
> 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)
There is also a test in hme_get() where we don't set the hardware checksum
flag if the UDP checksum is 0x0000. This will catch the case where the
hardware fails to generate the correct UDP sum.
So, I think that we should just disallow IFCAP_CSUM_UDPv4_Tx for HME. And,
I should revisit the GEM driver, and look to see if it makes sense to turn
on the hardware receive checksums there.
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
Main Index |
Thread Index |