rte_hash(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

okay so rte_hash is the cuckoo hash table struct from rte_cuckoo_hash.h, and this whole manual page is rte_hash(3) β€” yes bestie, that’s the manual name, folded in right here so we don’t have to copy the header line like a boring little robot. It’s giving β€œlibrary functions manual” but make it fashion. πŸ’…


✨ SYNOPSIS ✨

#include <rte_cuckoo_hash.h>

πŸŽ€ Data Fields πŸŽ€

Here’s the full roster, no skips, no cap:

  • char name [RTE_HASH_NAMESIZE]
  • uint32_t entries
  • uint32_t num_buckets
  • struct rte_ring * free_slots
  • struct lcore_cache * local_free_slots
  • struct rte_hash_rcu_config * hash_rcu_cfg
  • struct rte_rcu_qsbr_dq * dq
  • uint32_t key_len
  • 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
  • unsigned int sig_cmp_fn
  • uint32_t bucket_bitmask
  • uint32_t key_entry_size
  • void * key_store
  • struct rte_hash_bucket * buckets
  • rte_rwlock_t * readwrite_lock
  • struct rte_hash_bucket * buckets_ext
  • struct rte_ring * free_ext_bkts
  • uint32_t * tbl_chng_cnt

🌸 Detailed Description 🌸

A hash table structure. Literally the whole vibe.

Definition at line 149 of file rte_cuckoo_hash.h.


πŸ¦‹ Field Documentation πŸ¦‹

char name[RTE_HASH_NAMESIZE]

The name of the hash β€” its little identity tag.

Definition at line 150 of file rte_cuckoo_hash.h.

uint32_t entries

Total table entries, aka the full headcount.

Definition at line 151 of file rte_cuckoo_hash.h.

uint32_t num_buckets

Number of buckets in the table.

Definition at line 152 of file rte_cuckoo_hash.h.

struct rte_ring* free_slots

Ring that stores all indexes of the free slots in the key table β€” the free-slot VIP list.

Definition at line 154 of file rte_cuckoo_hash.h.

struct lcore_cache* local_free_slots

Local cache per lcore, storing some indexes of the free slots β€” a little stash, not the whole ring.

Definition at line 157 of file rte_cuckoo_hash.h.

struct rte_hash_rcu_config* hash_rcu_cfg

HASH RCU QSBR configuration structure. Very config, much RCU.

Definition at line 161 of file rte_cuckoo_hash.h.

struct rte_rcu_qsbr_dq* dq

RCU QSBR defer queue.

Definition at line 163 of file rte_cuckoo_hash.h.

uint32_t key_len

Length of hash key.

Definition at line 167 of file rte_cuckoo_hash.h.

uint8_t hw_trans_mem_support

Tells you if hardware transactional memory is used.

Definition at line 169 of file rte_cuckoo_hash.h.

uint8_t use_local_cache

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

Definition at line 171 of file rte_cuckoo_hash.h.

uint8_t readwrite_concur_support

Tells you if read-write concurrency support is enabled.

Definition at line 175 of file rte_cuckoo_hash.h.

uint8_t ext_table_support

Enable extendable bucket table.

Definition at line 177 of file rte_cuckoo_hash.h.

uint8_t no_free_on_del

Controls whether the key index should be freed when you call the 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 β€” so don’t forget, bestie.

Definition at line 178 of file rte_cuckoo_hash.h.

uint8_t readwrite_concur_lf_support

Tells you if read-write concurrency lock free support is enabled.

Definition at line 184 of file rte_cuckoo_hash.h.

uint8_t writer_takes_lock

Indicates if the writer threads need to take lock.

Definition at line 186 of file rte_cuckoo_hash.h.

rte_hash_function hash_func

Function used to calculate hash.

Definition at line 188 of file rte_cuckoo_hash.h.

uint32_t hash_func_init_val

Init value used by hash_func.

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

enum cmp_jump_table_case cmp_jump_table_idx

Indicates which compare function to use.

Definition at line 192 of file rte_cuckoo_hash.h.

unsigned int sig_cmp_fn

Indicates which signature compare function to use.

Definition at line 194 of file rte_cuckoo_hash.h.

uint32_t bucket_bitmask

Bitmask for getting bucket index from hash signature.

Definition at line 196 of file rte_cuckoo_hash.h.

uint32_t key_entry_size

Size of each key entry.

Definition at line 198 of file rte_cuckoo_hash.h.

void* key_store

Table storing all keys and data.

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

rte_rwlock_t* readwrite_lock

Read-write lock thread-safety.

Definition at line 205 of file rte_cuckoo_hash.h.

struct rte_hash_bucket* buckets_ext

Extra buckets array.

Definition at line 206 of file rte_cuckoo_hash.h.

struct rte_ring* free_ext_bkts

Ring of indexes of free buckets.

Definition at line 207 of file rte_cuckoo_hash.h.

uint32_t* tbl_chng_cnt

Indicates if the hash table changed from last read.

Definition at line 215 of file rte_cuckoo_hash.h.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for DPDK from the source code. no cap, the robots did this one. πŸ€–πŸ’–

🌸 cute sign-off: source is DPDK, Version 26.03.0; the footer date slot is literally not showing a separate date, just the rte_hash(3) tag, so that’s the whole footer tea. bye bestie 🫢

πŸ“¦ where this page comes from