-
Notifications
You must be signed in to change notification settings - Fork 14
crc32: deal with NULL buffer case required by Ceph #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@tchaikov Please help review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of forking intel/isa-l, i am inclined to bump up ceph/isa-l's master to track the upstream if it is not updated, i am afraid it's not the case. i think this source file is almost identical to https://github.com/intel/isa-l/blob/8074e3fe1b9398a9d3b717267790050fc5041594/crc/crc32_iscsi_00.asm . can we just use it instead?
Ceph need to deal with the case when the input buffer is NULL: https://github.com/ceph/ceph/blob/master/src/test/common/test_crc32c.cc#L347 Signed-off-by: Changcheng Liu <[email protected]>
|
@aclamk do you happen to know if we have any real-world use case of https://github.com/ceph/ceph/blob/master/src/test/common/test_crc32c.cc#L358 ? or it's created this way just because it was more convenient than creating a buffer filled with zero? |
This code is testing performace of special crc function that calculates crc from zeros. |
|
thanks @aclamk . now i understand it better. seems we do need to have a dedicate function for calculating the crc of zero-filled buffers. |
|
@changchengx i feel that it could be function which can also benefit other projects interested in high-performance CRC32 calculating using the technique of cached/precalculated CRC32. if this makes sense to you, probably we can upstream this change? before that, i'd suggest create a dedicated function and keep it in Ceph. what do you think? |
I haven't understood this well. |
Ceph need to deal with the case when the input buffer is NULL:
https://github.com/ceph/ceph/blob/master/src/test/common/test_crc32c.cc#L347
Signed-off-by: Changcheng Liu [email protected]