DPDK  20.11.4-rc1
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

◆ rte_hash_crc_set_alg()

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 74 of file rte_crc_arm64.h.

◆ rte_hash_crc_1byte()

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 108 of file rte_crc_arm64.h.

◆ rte_hash_crc_2byte()

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 129 of file rte_crc_arm64.h.

◆ rte_hash_crc_4byte()

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:
examples/l3fwd/l3fwd_em.c, and examples/performance-thread/l3fwd-thread/main.c.

Definition at line 150 of file rte_crc_arm64.h.

◆ rte_hash_crc_8byte()

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 171 of file rte_crc_arm64.h.