DPDK 22.11.5
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
 
struct lcore_cache * local_free_slots
 
struct rte_hash_rcu_confighash_rcu_cfg
 
struct rte_rcu_qsbr_dq * dq
 
uint32_t key_len __rte_cache_aligned
 
uint8_t hw_trans_mem_support
 
uint8_t use_local_cache
 
uint8_t readwrite_concur_support
 
uint8_t ext_table_support
 
uint8_t no_free_on_del
 
uint8_t readwrite_concur_lf_support
 
uint8_t writer_takes_lock
 
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
 
rte_rwlock_t * readwrite_lock
 
struct rte_hash_bucketbuckets_ext
 
struct rte_ringfree_ext_bkts
 
uint32_t * tbl_chng_cnt
 

Detailed Description

A hash table structure.

Examples
examples/ipsec-secgw/ipsec-secgw.c, examples/l3fwd-power/main.c, examples/l3fwd/l3fwd_em.c, and examples/server_node_efd/node/node.c.

Definition at line 155 of file rte_cuckoo_hash.h.

Field Documentation

◆ name

char name[RTE_HASH_NAMESIZE]

Name of the hash.

Examples
examples/server_node_efd/node/node.c.

Definition at line 156 of file rte_cuckoo_hash.h.

◆ entries

uint32_t entries

Total table entries.

Definition at line 157 of file rte_cuckoo_hash.h.

◆ num_buckets

uint32_t num_buckets

Number of buckets in table.

Definition at line 158 of file rte_cuckoo_hash.h.

◆ free_slots

struct rte_ring* free_slots

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

Definition at line 160 of file rte_cuckoo_hash.h.

◆ local_free_slots

struct lcore_cache* local_free_slots

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

Definition at line 163 of file rte_cuckoo_hash.h.

◆ hash_rcu_cfg

struct rte_hash_rcu_config* hash_rcu_cfg

HASH RCU QSBR configuration structure

Definition at line 167 of file rte_cuckoo_hash.h.

◆ dq

struct rte_rcu_qsbr_dq* dq

RCU QSBR defer queue.

Definition at line 169 of file rte_cuckoo_hash.h.

◆ __rte_cache_aligned

uint32_t key_len __rte_cache_aligned

Length of hash key.

Definition at line 173 of file rte_cuckoo_hash.h.

◆ hw_trans_mem_support

uint8_t hw_trans_mem_support

If hardware transactional memory is used.

Definition at line 175 of file rte_cuckoo_hash.h.

◆ use_local_cache

uint8_t use_local_cache

If multi-writer support is enabled, use local cache to allocate key-store slots.

Definition at line 177 of file rte_cuckoo_hash.h.

◆ readwrite_concur_support

uint8_t readwrite_concur_support

If read-write concurrency support is enabled

Definition at line 181 of file rte_cuckoo_hash.h.

◆ ext_table_support

uint8_t ext_table_support

Enable extendable bucket table

Definition at line 183 of file rte_cuckoo_hash.h.

◆ no_free_on_del

uint8_t no_free_on_del

If key index should be freed on calling rte_hash_del_xxx APIs. If this is set, rte_hash_free_key_with_position must be called to free the key index associated with the deleted entry. This flag is enabled by default.

Definition at line 184 of file rte_cuckoo_hash.h.

◆ readwrite_concur_lf_support

uint8_t readwrite_concur_lf_support

If read-write concurrency lock free support is enabled

Definition at line 190 of file rte_cuckoo_hash.h.

◆ writer_takes_lock

uint8_t writer_takes_lock

Indicates if the writer threads need to take lock

Definition at line 192 of file rte_cuckoo_hash.h.

◆ hash_func

rte_hash_function hash_func

Function used to calculate hash.

Definition at line 194 of file rte_cuckoo_hash.h.

◆ hash_func_init_val

uint32_t hash_func_init_val

Init value used by hash_func.

Definition at line 195 of file rte_cuckoo_hash.h.

◆ rte_hash_custom_cmp_eq

rte_hash_cmp_eq_t rte_hash_custom_cmp_eq

Custom function used to compare keys.

Definition at line 196 of file rte_cuckoo_hash.h.

◆ cmp_jump_table_idx

enum cmp_jump_table_case cmp_jump_table_idx

Indicates which compare function to use.

Definition at line 198 of file rte_cuckoo_hash.h.

◆ sig_cmp_fn

enum rte_hash_sig_compare_function sig_cmp_fn

Indicates which signature compare function to use.

Definition at line 200 of file rte_cuckoo_hash.h.

◆ bucket_bitmask

uint32_t bucket_bitmask

Bitmask for getting bucket index from hash signature.

Definition at line 202 of file rte_cuckoo_hash.h.

◆ key_entry_size

uint32_t key_entry_size

Size of each key entry.

Definition at line 204 of file rte_cuckoo_hash.h.

◆ key_store

void* key_store

Table storing all keys and data

Definition at line 206 of file rte_cuckoo_hash.h.

◆ buckets

struct rte_hash_bucket* buckets

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

Definition at line 207 of file rte_cuckoo_hash.h.

◆ readwrite_lock

rte_rwlock_t* readwrite_lock

Read-write lock thread-safety.

Definition at line 211 of file rte_cuckoo_hash.h.

◆ buckets_ext

struct rte_hash_bucket* buckets_ext

Extra buckets array

Definition at line 212 of file rte_cuckoo_hash.h.

◆ free_ext_bkts

struct rte_ring* free_ext_bkts

Ring of indexes of free buckets

Definition at line 213 of file rte_cuckoo_hash.h.

◆ tbl_chng_cnt

uint32_t* tbl_chng_cnt

Indicates if the hash table changed from last read.

Definition at line 221 of file rte_cuckoo_hash.h.


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