Bug #13713
closedCeph CRC32 algorithm appears broken
0%
Description
I was looking at wireshark packets and I wanted to see if I could verify the crc checksums that Ceph is generating and receiving. The code shows that Ceph is using the castagnoli crc32 variant. I wasn't able to reproduce the checksum so I fell back to looking at Ceph's unit tests and tried to reproduce this: https://github.com/ceph/ceph/blob/master/src/test/common/test_crc32c.cc#L21
I have example code here in Rust: https://gist.github.com/cholcombe973/b0846a814be0a9e885f8
and in Python that produce different results: https://gist.github.com/cholcombe973/a0af818d212e58ae151c
Is the unit test for this file using generated output from the crc32 algorithm in the code base or a known good hash?
I'm guessing I am doing something wrong here but I'm not entirely sure what.