From a3e87103daa6b8eb274dce8409ebc87fe3a3595d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 22 Feb 2012 20:29:42 +0100 Subject: [PATCH] Use crc32c for the verify_header checksum It's the only hardware assisted crypto we have, and it's widely available in any recent Intel CPU. Signed-off-by: Jens Axboe --- verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/verify.c b/verify.c index d6abb983..f40d7e11 100644 --- a/verify.c +++ b/verify.c @@ -651,7 +651,7 @@ static int verify_hdr_crc(struct verify_header *hdr) void *p = hdr; uint32_t crc; - crc = crc32(p, sizeof(*hdr) - sizeof(hdr->crc32)); + crc = crc32c(p, sizeof(*hdr) - sizeof(hdr->crc32)); if (crc == hdr->crc32) return 1; @@ -866,7 +866,7 @@ static void populate_hdr(struct thread_data *td, struct io_u *io_u, hdr->pad1 = 0; hdr->rand_seed = io_u->rand_seed; hdr->pad2 = 0; - hdr->crc32 = crc32(p, sizeof(*hdr) - sizeof(hdr->crc32)); + hdr->crc32 = crc32c(p, sizeof(*hdr) - sizeof(hdr->crc32)); data_len = header_len - hdr_size(hdr); -- 2.25.1