Subject: M_CSUM_DATA verus bge
To: None <tech-net@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 03/12/2003 14:00:52
bge(4) currently just doesn't work with receive-side checksum offload.

I found why by comparison to FreeBSD: quite apart from any hardware
bugs, when the bge hardware returns an Rx TCP or UDP checksum, that
value does *not* include the e TCP pseudo-header.

An obvious fix: allocate a high-order bit in csu_flags to indicate
this quirk.  Modify tcp_input.c and udp_usrreq to check for this
quirk, and if found, compute the pseudo-header sum in software and
update the csum_data field to the `normal' value, and strip the quirk flag.

that preserves the existing carefully-chosen bitflags (and
compiler-emitted jump tables).

Sound reasonable? Anyone (Jason?) see a better way?