From: Jens Axboe Date: Wed, 22 Feb 2012 19:29:42 +0000 (+0100) Subject: Use crc32c for the verify_header checksum X-Git-Tag: fio-2.0.4~8 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a3e87103daa6b8eb274dce8409ebc87fe3a3595d 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 --- 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);