It's the only hardware assisted crypto we have, and it's
widely available in any recent Intel CPU.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
void *p = hdr;
uint32_t crc;
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;
if (crc == hdr->crc32)
return 1;
hdr->pad1 = 0;
hdr->rand_seed = io_u->rand_seed;
hdr->pad2 = 0;
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);
data_len = header_len - hdr_size(hdr);