tcp/udp hardware checksum offload support..
tcp/udp hardware checksum offload support..
- Subject: tcp/udp hardware checksum offload support..
- From: Andrew Gallatin <email@hidden>
- Date: Mon, 28 Jan 2002 16:22:48 -0500 (EST)
Hi,
I've got an "ethernet" device which can do TCP/UDP checksum offload on
receive, but not transmit.
In ip_input(), darwin discards checksums on packets from devices whose
if_hwassist is set to 0. However, in the original FreeBSD code,
if_hwassist is meant only to tell what sort of transmit offloading a
device will do.
To make recv. checksum offloading work with my device, I needed to set
if_hwassist to a non-zero value which is nonsense wrt to xmit offload
capabilities. This seems broken to me.
Also, why does darwin not allow csum offloading for received ip
fragments using the CSUM_TCP_SUM16 method?
BTW, its rather amusing. I loose roughly 100Mb/sec when I turn on
receiver offloading (800Mb/sec -> 700Mb/sec). I know the settings are
correct, because UDP tests show a reduction in drops due to full
socket buffers when csum offloading is on. This is a dual g4-800.
I've seen platforms where csum offload doesn't make much difference,
but this is the first platform I've seen where it actually hurts!
Thanks,
Drew