DPDK  16.07.2
Data Fields
rte_hash Struct Reference

#include <rte_cuckoo_hash.h>

Data Fields

char name [RTE_HASH_NAMESIZE]
uint32_t entries
uint32_t num_buckets
uint32_t key_len
rte_hash_function hash_func
uint32_t hash_func_init_val
rte_hash_cmp_eq_t rte_hash_custom_cmp_eq
enum cmp_jump_table_case cmp_jump_table_idx
uint32_t bucket_bitmask
uint32_t key_entry_size
struct rte_ringfree_slots
void * key_store
struct rte_hash_bucketbuckets
uint8_t hw_trans_mem_support
struct lcore_cache * local_free_slots
enum add_key_case add_key
rte_spinlock_tmultiwriter_lock

Detailed Description

A hash table structure.

Examples:
l3fwd-power/main.c, l3fwd-vf/main.c, and performance-thread/l3fwd-thread/main.c.

Definition at line 184 of file rte_cuckoo_hash.h.

Field Documentation

char name[RTE_HASH_NAMESIZE]

Name of the hash.

Definition at line 185 of file rte_cuckoo_hash.h.

uint32_t entries

Total table entries.

Definition at line 186 of file rte_cuckoo_hash.h.

uint32_t num_buckets

Number of buckets in table.

Definition at line 187 of file rte_cuckoo_hash.h.

uint32_t key_len

Length of hash key.

Definition at line 188 of file rte_cuckoo_hash.h.

rte_hash_function hash_func

Function used to calculate hash.

Definition at line 189 of file rte_cuckoo_hash.h.

uint32_t hash_func_init_val

Init value used by hash_func.

Definition at line 190 of file rte_cuckoo_hash.h.

rte_hash_cmp_eq_t rte_hash_custom_cmp_eq

Custom function used to compare keys.

Definition at line 192 of file rte_cuckoo_hash.h.

enum cmp_jump_table_case cmp_jump_table_idx

Indicates which compare function to use.

Definition at line 193 of file rte_cuckoo_hash.h.

uint32_t bucket_bitmask

Bitmask for getting bucket index from hash signature.

Definition at line 195 of file rte_cuckoo_hash.h.

uint32_t key_entry_size

Size of each key entry.

Definition at line 197 of file rte_cuckoo_hash.h.

struct rte_ring* free_slots

Ring that stores all indexes of the free slots in the key table

Definition at line 199 of file rte_cuckoo_hash.h.

void* key_store

Table storing all keys and data

Definition at line 201 of file rte_cuckoo_hash.h.

struct rte_hash_bucket* buckets

Table with buckets storing all the hash values and key indexes to the key table

Definition at line 202 of file rte_cuckoo_hash.h.

uint8_t hw_trans_mem_support

Hardware transactional memory support

Definition at line 205 of file rte_cuckoo_hash.h.

struct lcore_cache* local_free_slots

Local cache per lcore, storing some indexes of the free slots

Definition at line 207 of file rte_cuckoo_hash.h.

enum add_key_case add_key

Multi-writer hash add behavior

Definition at line 209 of file rte_cuckoo_hash.h.

rte_spinlock_t* multiwriter_lock

Multi-writer spinlock for w/o TM

Definition at line 211 of file rte_cuckoo_hash.h.


The documentation for this struct was generated from the following file: