RE: x86/csum: Remove unnecessary odd handling
From: David Laight
Date: Thu Jun 29 2023 - 10:28:02 EST
...
> > All csum kunit tests pass.
Last time I looked I couldn't see where generated IPv6
checksums get changed from 0x0000 (from ~csum_fold() using
adc) to 0xffff - which I think the protocol requires.
The trivial way to do this is to initialise the sum to 1
(instead or 0 or 0xffff) and then add 1 after the invert.
It doesn't matter (much) for IPv4 because 0x0000 is 'no checksum'
rather than 'invalid'.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)