DPDK  16.11.11
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
 
struct rte_ringfree_slots
 
uint8_t hw_trans_mem_support
 
struct lcore_cache * local_free_slots
 
enum add_key_case add_key
 
rte_spinlock_tmultiwriter_lock
 
uint32_t key_len __rte_cache_aligned
 
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
 
enum rte_hash_sig_compare_function sig_cmp_fn
 
uint32_t bucket_bitmask
 
uint32_t key_entry_size
 
void * key_store
 
struct rte_hash_bucketbuckets
 

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 186 of file rte_cuckoo_hash.h.

Field Documentation

char name[RTE_HASH_NAMESIZE]

Name of the hash.

Definition at line 187 of file rte_cuckoo_hash.h.

uint32_t entries

Total table entries.

Definition at line 188 of file rte_cuckoo_hash.h.

uint32_t num_buckets

Number of buckets in table.

Definition at line 189 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 191 of file rte_cuckoo_hash.h.

uint8_t hw_trans_mem_support

Hardware transactional memory support

Definition at line 193 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 195 of file rte_cuckoo_hash.h.

enum add_key_case add_key

Multi-writer hash add behavior

Definition at line 197 of file rte_cuckoo_hash.h.

rte_spinlock_t* multiwriter_lock

Multi-writer spinlock for w/o TM

Definition at line 199 of file rte_cuckoo_hash.h.

uint32_t key_len __rte_cache_aligned

Length of hash key.

Definition at line 203 of file rte_cuckoo_hash.h.

rte_hash_function hash_func

Function used to calculate hash.

Definition at line 205 of file rte_cuckoo_hash.h.

uint32_t hash_func_init_val

Init value used by hash_func.

Definition at line 206 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 207 of file rte_cuckoo_hash.h.

enum cmp_jump_table_case cmp_jump_table_idx

Indicates which compare function to use.

Definition at line 209 of file rte_cuckoo_hash.h.

enum rte_hash_sig_compare_function sig_cmp_fn

Indicates which signature compare function to use.

Definition at line 211 of file rte_cuckoo_hash.h.

uint32_t bucket_bitmask

Bitmask for getting bucket index from hash signature.

Definition at line 213 of file rte_cuckoo_hash.h.

uint32_t key_entry_size

Size of each key entry.

Definition at line 215 of file rte_cuckoo_hash.h.

void* key_store

Table storing all keys and data

Definition at line 217 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 218 of file rte_cuckoo_hash.h.


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