Subject: gimp checksum offloading
To: None <>
From: john heasley <>
List: tech-net
Date: 10/20/2004 23:48:47
I'm only really familiar with the hme and gem ether chips.  Both of these
will do a checksum starting at some offset to the end of the frame.  They
do not add the pseudo header, handle the ether FCS, etc.  It seems that
some others do, like the 3com xl; correct me if I'm wrong.

If these start their checksum at ether_hdr_len + ip_hdr_len, then the
checksum will include any IP options and the ether FCS.  or, it can
begin at the offset of the source IP address, thus adding a portion of the
pseudo header.

As for the FCS, both have options to strip the FCS.   Isn't the FCS useful
for pcap/bpf?  something else?

Would it be worth adding flags similar to M_CSUM_NO_PSEUDOHDR to handle
these extra data?  _HASFCS (which exists, but does not seem to adjust the
hw csum), _MIGHT_HAVE_OPTS (deduct IP options), and _PARTIAL_PSEUDOHDR.

Perhaps that extra processing would be slower than just computing the sum
in the tcp/udp input routines?  I guess that is the primary question; else
the driver could use FCS stripping and just punt if the packet has IP

hope that is the flu and not feeling terribly coherent.