CRC-16 utility functions. More...
Macros | |
#define | SPDK_T10DIF_CRC16_POLYNOMIAL 0x8bb7u |
T10-DIF CRC-16 polynomial. | |
Functions | |
uint16_t | spdk_crc16_t10dif (uint16_t init_crc, const void *buf, size_t len) |
Calculate T10-DIF CRC-16 checksum. | |
uint16_t | spdk_crc16_t10dif_copy (uint16_t init_crc, uint8_t *dst, uint8_t *src, size_t len) |
Calculate T10-DIF CRC-16 checksum and copy data. | |
CRC-16 utility functions.
uint16_t spdk_crc16_t10dif | ( | uint16_t | init_crc, |
const void * | buf, | ||
size_t | len ) |
Calculate T10-DIF CRC-16 checksum.
init_crc | Initial CRC-16 value. |
buf | Data buffer to checksum. |
len | Length of buf in bytes. |
uint16_t spdk_crc16_t10dif_copy | ( | uint16_t | init_crc, |
uint8_t * | dst, | ||
uint8_t * | src, | ||
size_t | len ) |
Calculate T10-DIF CRC-16 checksum and copy data.
init_crc | Initial CRC-16 value. |
dst | Destination data buffer for copy. |
src | Source data buffer for CRC calculation and copy. |
len | Length of buffer in bytes. |