Loading...
Searching...
No Matches
crc32.h File Reference

CRC-32 utility functions. More...

Macros

#define SPDK_CRC32_SIZE_BYTES   4
 

Functions

uint32_t spdk_crc32_ieee_update (const void *buf, size_t len, uint32_t crc)
 Calculate a partial CRC-32 IEEE checksum.
 
uint32_t spdk_crc32c_update (const void *buf, size_t len, uint32_t crc)
 Calculate a partial CRC-32C checksum.
 
uint32_t spdk_crc32c_iov_update (struct iovec *iov, int iovcnt, uint32_t crc32c)
 Calculate a partial CRC-32C checksum.
 
uint32_t spdk_crc32c_nvme (const void *buf, size_t len, uint32_t crc)
 Calculate a CRC-32C checksum, for NVMe Protection Information.
 

Detailed Description

CRC-32 utility functions.

Function Documentation

◆ spdk_crc32_ieee_update()

uint32_t spdk_crc32_ieee_update ( const void * buf,
size_t len,
uint32_t crc )

Calculate a partial CRC-32 IEEE checksum.

Parameters
bufData buffer to checksum.
lenLength of buf in bytes.
crcPrevious CRC-32 value.
Returns
Updated CRC-32 value.

◆ spdk_crc32c_iov_update()

uint32_t spdk_crc32c_iov_update ( struct iovec * iov,
int iovcnt,
uint32_t crc32c )

Calculate a partial CRC-32C checksum.

Parameters
iovData buffer vectors to checksum.
iovcntsize of iov parameter.
crc32cPrevious CRC-32C value.
Returns
Updated CRC-32C value.

◆ spdk_crc32c_nvme()

uint32_t spdk_crc32c_nvme ( const void * buf,
size_t len,
uint32_t crc )

Calculate a CRC-32C checksum, for NVMe Protection Information.

Parameters
bufData buffer to checksum.
lenLength of buf in bytes.
crcPrevious CRC-32C value.
Returns
Updated CRC-32C value.

◆ spdk_crc32c_update()

uint32_t spdk_crc32c_update ( const void * buf,
size_t len,
uint32_t crc )

Calculate a partial CRC-32C checksum.

Parameters
bufData buffer to checksum.
lenLength of buf in bytes.
crcPrevious CRC-32C value.
Returns
Updated CRC-32C value.