Subject: Re: M_CSUM_DATA verus bge
To: Jason R Thorpe <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 03/12/2003 16:28:04
>I'd say handle it in the bge driver itself. No need to pollute the rest
>of the kernel that knowledge.
It's semi-legit; for fragmented UDP traffic, one could imagine getting
a payload-only cksum for each fragment and gluing them together.
The big downside of fixing this in the driver is that it requires
parsing allthe way up to the transport layer header: verify the IP
header is good, parse the IP header length, check the IP-protocol is
TCP or UDP, then do the appropriate pseudo-header changes.
Arguably cleaner and cheaper, to expose this variant of cksum-offload
to the TCP and UDP input routines. (Or from the other side: not really
the bge driver's business to be doing that much parsing of layer-2
and layer-3 headers).
I do see your point. but unless there's a compelling reason,
I'd sooner do it the way I proposed.