DPDK  16.04.0
Functions
rte_crc_arm64.h File Reference
#include <stdint.h>
#include <rte_cpuflags.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>

Go to the source code of this file.

Functions

static void rte_hash_crc_set_alg (uint8_t alg)
static uint32_t rte_hash_crc_1byte (uint8_t data, uint32_t init_val)
static uint32_t rte_hash_crc_2byte (uint16_t data, uint32_t init_val)
static uint32_t rte_hash_crc_4byte (uint32_t data, uint32_t init_val)
static uint32_t rte_hash_crc_8byte (uint64_t data, uint32_t init_val)

Detailed Description

RTE CRC arm64 Hash

Definition in file rte_crc_arm64.h.

Function Documentation

static void rte_hash_crc_set_alg ( uint8_t  alg)
inlinestatic

Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash calculation.

Parameters
algAn OR of following flags:
  • (CRC32_SW) Don't use arm64 crc intrinsics
  • (CRC32_ARM64) Use ARMv8 CRC intrinsic if available

Definition at line 107 of file rte_crc_arm64.h.

static uint32_t rte_hash_crc_1byte ( uint8_t  data,
uint32_t  init_val 
)
inlinestatic

Use single crc32 instruction to perform a hash on a 1 byte value. Fall back to software crc32 implementation in case arm64 crc intrinsics is not supported

Parameters
dataData to perform hash on.
init_valValue to initialise hash generator.
Returns
32bit calculated hash value.

Definition at line 140 of file rte_crc_arm64.h.

static uint32_t rte_hash_crc_2byte ( uint16_t  data,
uint32_t  init_val 
)
inlinestatic

Use single crc32 instruction to perform a hash on a 2 bytes value. Fall back to software crc32 implementation in case arm64 crc intrinsics is not supported

Parameters
dataData to perform hash on.
init_valValue to initialise hash generator.
Returns
32bit calculated hash value.

Definition at line 161 of file rte_crc_arm64.h.

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. Fall back to software crc32 implementation in case arm64 crc intrinsics is not supported

Parameters
dataData to perform hash on.
init_valValue to initialise hash generator.
Returns
32bit calculated hash value.
Examples:
performance-thread/l3fwd-thread/main.c.

Definition at line 182 of file rte_crc_arm64.h.

static uint32_t rte_hash_crc_8byte ( uint64_t  data,
uint32_t  init_val 
)
inlinestatic

Use single crc32 instruction to perform a hash on a 8 byte value. Fall back to software crc32 implementation in case arm64 crc intrinsics is not supported

Parameters
dataData to perform hash on.
init_valValue to initialise hash generator.
Returns
32bit calculated hash value.

Definition at line 203 of file rte_crc_arm64.h.