Re: [ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation

2012-12-31 Thread Ben Pfaff
On Sun, Dec 30, 2012 at 11:14:57AM +1300, Joe Stringer wrote: > Previously I misunderstood the way that the checksum works. I now > understand that the constants are in host-byte order, and the result > of the computation provides a checksum in the mirrored byte order. > This means the calculation

Re: [ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation

2012-12-29 Thread Joe Stringer
I've got a version in the works with tests in tests/test-csum.c. Previously I misunderstood the way that the checksum works. I now understand that the constants are in host-byte order, and the result of the computation provides a checksum in the mirrored byte order. This means the calculation will

Re: [ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation

2012-12-26 Thread Ben Pfaff
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 > > Would y

Re: [ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation

2012-12-26 Thread Ben Pfaff
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 Would you mind adding a test? tests/test-csum.c is a reasonable place to put it

[ovs-dev] [PATCHv2 1/4] lib: Add CRC32C Implementation

2012-12-18 Thread Joe Stringer
This implementation was derived from FreeBSD: http://code.google.com/p/freebsd-head/source/browse/sys/libkern/crc32.c Signed-off-by: Joe Stringer --- v2: Update copyright notice Use network byte-order Include config.h (Fix sparse error) --- lib/automake.mk |2 + lib/crc32c.c| 14