Subject: Re: wm* hardware assist breaking gif tunnels
To: None <tech-net@NetBSD.org>
From: Darren Reed <darrenr@netbsd.org>
List: tech-net
Date: 09/09/2007 19:28:34
David Young wrote:
> On Thu, Sep 06, 2007 at 05:43:00PM +0000, John Klos wrote:
> > Any suggestions?
>
> Taking a guess, maybe wm h/w sets received packets' embedded checksums
> to 0 (or anything not equal to the actual checksum) when h/w assist
> is active?  Maybe wm h/w expects for an embedded checksum to be 0 in
> transmitted packets, also?  I have seen wm(4) lose in a bridge until I
> turned off h/w checksum; it may have been for that very reason.
> And I see this comment in ip_output(),
>
>                 /*
>                  * Always initialize the sum to 0!  Some HW assisted
>                  * checksumming requires this.
>                  */
>                 ip->ip_sum = 0;
>   

Correct.  For some NICs, the hardware checksum is computed by specifying
a start and end offset: if ip_sum isn't 0, the start is the beginning of 
the IP header
and the end is, well, at the end, the checksum placed in ip_sum will be 
wrong.

Darren