[ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation
Ben Pfaff
blp at nicira.com
Wed Dec 26 23:35:35 UTC 2012
On Wed, Dec 26, 2012 at 03:23:39PM -0800, Ben Pfaff wrote:
> On Tue, Dec 18, 2012 at 11:00:38PM +1300, Joe Stringer wrote:
> > This implementation was derived from FreeBSD:
> > http://code.google.com/p/freebsd-head/source/browse/sys/libkern/crc32.c
> >
> > Signed-off-by: Joe Stringer <joe at wand.net.nz>
>
> Would you mind adding a test? tests/test-csum.c is a reasonable place
> to put it.
Also, sparse has several complaints about crc32c.c of the form:
../lib/crc32c.c:70:18: warning: incorrect type in initializer (different base types)
../lib/crc32c.c:70:18: expected restricted __be32
../lib/crc32c.c:70:18: got unsigned long
and I think I agree with it: those constants are in host byte order,
not network byte order. Something is odd here.
Thanks,
Ben.
More information about the dev
mailing list