| rte_fbk_hash.h(3) | Library Functions Manual | rte_fbk_hash.h(3) |
rte_fbk_hash.h
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <rte_hash_crc.h>
#include <rte_jhash.h>
struct rte_fbk_hash_params
union rte_fbk_hash_entry
struct rte_fbk_hash_table
#define RTE_FBK_HASH_INIT_VAL_DEFAULT 0xFFFFFFFF
#define RTE_FBK_HASH_ENTRIES_MAX (1 << 20)
#define RTE_FBK_HASH_ENTRIES_PER_BUCKET_MAX 256
#define RTE_FBK_HASH_NAMESIZE 32
typedef uint32_t(* rte_fbk_hash_fn) (uint32_t key,
uint32_t init_val)
static uint32_t rte_fbk_hash_get_bucket (const struct
rte_fbk_hash_table *ht, uint32_t key)
static int rte_fbk_hash_add_key_with_bucket (struct
rte_fbk_hash_table *ht, uint32_t key, uint16_t value, uint32_t
bucket)
static int rte_fbk_hash_add_key (struct rte_fbk_hash_table *ht,
uint32_t key, uint16_t value)
static int rte_fbk_hash_delete_key_with_bucket (struct
rte_fbk_hash_table *ht, uint32_t key, uint32_t bucket)
static int rte_fbk_hash_delete_key (struct rte_fbk_hash_table
*ht, uint32_t key)
static int rte_fbk_hash_lookup_with_bucket (const struct
rte_fbk_hash_table *ht, uint32_t key, uint32_t bucket)
static int rte_fbk_hash_lookup (const struct rte_fbk_hash_table
*ht, uint32_t key)
static void rte_fbk_hash_clear_all (struct rte_fbk_hash_table
*ht)
static double rte_fbk_hash_get_load_factor (struct
rte_fbk_hash_table *ht)
struct rte_fbk_hash_table * rte_fbk_hash_find_existing (const
char *name)
struct rte_fbk_hash_table * rte_fbk_hash_create (const struct
rte_fbk_hash_params *params)
void rte_fbk_hash_free (struct rte_fbk_hash_table *ht)
This is a hash table implementation for four byte keys (fbk).
Note that the return value of the add function should always be checked as, if a bucket is full, the key is not added even if there is space in other buckets. This keeps the lookup function very simple and therefore fast.
Definition in file rte_fbk_hash.h.
Initialising value used when calculating hash.
Definition at line 32 of file rte_fbk_hash.h.
The maximum number of entries in the hash table that is supported.
Definition at line 36 of file rte_fbk_hash.h.
The maximum number of entries in each bucket that is supported.
Definition at line 39 of file rte_fbk_hash.h.
Maximum size of string for naming the hash.
Definition at line 42 of file rte_fbk_hash.h.
Type of function that can be used for calculating the hash value.
Definition at line 45 of file rte_fbk_hash.h.
Find the offset into hash table of the bucket containing a particular key.
Parameters
Returns
Definition at line 94 of file rte_fbk_hash.h.
Add a key to an existing hash table with bucket id. This operation is not multi-thread safe and should only be called from one thread.
Parameters
Returns
Definition at line 117 of file rte_fbk_hash.h.
Add a key to an existing hash table. This operation is not multi-thread safe and should only be called from one thread.
Parameters
Returns
Definition at line 162 of file rte_fbk_hash.h.
Remove a key with a given bucket id from an existing hash table. This operation is not multi-thread safe and should only be called from one thread.
Parameters
Returns
Definition at line 184 of file rte_fbk_hash.h.
Remove a key from an existing hash table. This operation is not multi-thread safe and should only be called from one thread.
Parameters
Returns
Definition at line 227 of file rte_fbk_hash.h.
Find a key in the hash table with a given bucketid. This operation is multi-thread safe.
Parameters
Returns
Definition at line 247 of file rte_fbk_hash.h.
Find a key in the hash table. This operation is multi-thread safe.
Parameters
Returns
Definition at line 277 of file rte_fbk_hash.h.
Delete all entries in a hash table. This operation is not multi-thread safe and should only be called from one thread.
Parameters
Definition at line 291 of file rte_fbk_hash.h.
Find what fraction of entries are being used.
Parameters
Returns
Definition at line 306 of file rte_fbk_hash.h.
Performs a lookup for an existing hash table, and returns a pointer to the table if found.
Parameters
Returns
Create a new hash table for use with four byte keys.
Parameters
Returns
Free all memory used by a hash table. Has no effect on hash tables allocated in memory zones
Parameters
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |