DPDK  18.05.1
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:
examples/ipsec-secgw/ipsec-secgw.c, examples/l3fwd-power/main.c, examples/l3fwd-vf/main.c, examples/l3fwd/l3fwd_em.c, examples/performance-thread/l3fwd-thread/main.c, and examples/server_node_efd/node/node.c.

Definition at line 151 of file rte_cuckoo_hash.h.

Field Documentation

char name[RTE_HASH_NAMESIZE]

Name of the hash.

Examples:
examples/server_node_efd/node/node.c.

Definition at line 152 of file rte_cuckoo_hash.h.

uint32_t entries

Total table entries.

Definition at line 153 of file rte_cuckoo_hash.h.

uint32_t num_buckets

Number of buckets in table.

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

uint8_t hw_trans_mem_support

Hardware transactional memory support

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

enum add_key_case add_key

Multi-writer hash add behavior

Definition at line 162 of file rte_cuckoo_hash.h.

rte_spinlock_t* multiwriter_lock

Multi-writer spinlock for w/o TM

Definition at line 164 of file rte_cuckoo_hash.h.

uint32_t key_len __rte_cache_aligned

Length of hash key.

Definition at line 169 of file rte_cuckoo_hash.h.

rte_hash_function hash_func

Function used to calculate hash.

Definition at line 170 of file rte_cuckoo_hash.h.

uint32_t hash_func_init_val

Init value used by hash_func.

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

enum cmp_jump_table_case cmp_jump_table_idx

Indicates which compare function to use.

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

uint32_t bucket_bitmask

Bitmask for getting bucket index from hash signature.

Definition at line 179 of file rte_cuckoo_hash.h.

uint32_t key_entry_size

Size of each key entry.

Definition at line 180 of file rte_cuckoo_hash.h.

void* key_store

Table storing all keys and data

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


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