#include <stdint.h>
#include <nmmintrin.h>
Functions |
static uint32_t | rte_hash_crc_4byte (uint32_t data, uint32_t init_val) |
static uint32_t | rte_hash_crc (const void *data, uint32_t data_len, uint32_t init_val) |
Detailed Description
Function Documentation
static uint32_t rte_hash_crc |
( |
const void * |
data, |
|
|
uint32_t |
data_len, |
|
|
uint32_t |
init_val |
|
) |
| |
|
inlinestatic |
Use crc32 instruction to perform a hash.
- Parameters
-
data | Data to perform hash on. |
data_len | How many bytes to use to calculate hash value. |
init_val | Value to initialise hash generator. |
- Returns
- 32bit calculated hash value.
static uint32_t rte_hash_crc_4byte |
( |
uint32_t |
data, |
|
|
uint32_t |
init_val |
|
) |
| |
|
inlinestatic |
Use single crc32 instruction to perform a hash on a 4 byte value.
- Parameters
-
data | Data to perform hash on. |
init_val | Value to initialise hash generator. |
- Returns
- 32bit calculated hash value.