staticuint32_trte_fbk_hash_get_bucket(conststructrte_fbk_hash_table*ht,uint32_tkey)[inline],[static]
Find the offset into hash table of the bucket containing a particular key.
Parametersht Pointer to hash table.
key Key to calculate bucket for.
Returns
Offset into hash table.
Definition at line 94 of file rte_fbk_hash.h.
staticintrte_fbk_hash_add_key_with_bucket(structrte_fbk_hash_table*ht,uint32_tkey,uint16_tvalue,uint32_tbucket)[inline],[static]
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.
Parametersht Hash table to add the key to.
key Key to add to the hash table.
value Value to associate with key.
bucket Bucket to associate with key.
Returns
0 if ok, or negative value on error.
Definition at line 117 of file rte_fbk_hash.h.
staticintrte_fbk_hash_add_key(structrte_fbk_hash_table*ht,uint32_tkey,uint16_tvalue)[inline],[static]
Add a key to an existing hash table. This operation is not multi-thread safe and should only be called
from one thread.
Parametersht Hash table to add the key to.
key Key to add to the hash table.
value Value to associate with key.
Returns
0 if ok, or negative value on error.
Definition at line 162 of file rte_fbk_hash.h.
staticintrte_fbk_hash_delete_key_with_bucket(structrte_fbk_hash_table*ht,uint32_tkey,uint32_tbucket)[inline],[static]
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.
Parametersht Hash table to remove the key from.
key Key to remove from the hash table.
bucket Bucket id associate with key.
Returns
0 if ok, or negative value on error.
Definition at line 184 of file rte_fbk_hash.h.
staticintrte_fbk_hash_delete_key(structrte_fbk_hash_table*ht,uint32_tkey)[inline],[static]
Remove a key from an existing hash table. This operation is not multi-thread safe and should only be
called from one thread.
Parametersht Hash table to remove the key from.
key Key to remove from the hash table.
Returns
0 if ok, or negative value on error.
Definition at line 227 of file rte_fbk_hash.h.
staticintrte_fbk_hash_lookup_with_bucket(conststructrte_fbk_hash_table*ht,uint32_tkey,uint32_tbucket)[inline],[static]
Find a key in the hash table with a given bucketid. This operation is multi-thread safe.
Parametersht Hash table to look in.
key Key to find.
bucket Bucket associate to the key.
Returns
The value that was associated with the key, or negative value on error.
Definition at line 247 of file rte_fbk_hash.h.
staticintrte_fbk_hash_lookup(conststructrte_fbk_hash_table*ht,uint32_tkey)[inline],[static]
Find a key in the hash table. This operation is multi-thread safe.
Parametersht Hash table to look in.
key Key to find.
Returns
The value that was associated with the key, or negative value on error.
Definition at line 277 of file rte_fbk_hash.h.
staticvoidrte_fbk_hash_clear_all(structrte_fbk_hash_table*ht)[inline],[static]
Delete all entries in a hash table. This operation is not multi-thread safe and should only be called
from one thread.
Parametersht Hash table to delete entries in.
Definition at line 291 of file rte_fbk_hash.h.
staticdoublerte_fbk_hash_get_load_factor(structrte_fbk_hash_table*ht)[inline],[static]
Find what fraction of entries are being used.
Parametersht Hash table to find how many entries are being used in.
Returns
Load factor of the hash table, or negative value on error.
Definition at line 306 of file rte_fbk_hash.h.
structrte_fbk_hash_table*rte_fbk_hash_find_existing(constchar*name)
Performs a lookup for an existing hash table, and returns a pointer to the table if found.
Parametersname Name of the hash table to find
Returns
pointer to hash table structure or NULL on error with rte_errno set appropriately. Possible rte_errno
values include:
• ENOENT - required entry not available to return.
structrte_fbk_hash_table*rte_fbk_hash_create(conststructrte_fbk_hash_params*params)
Create a new hash table for use with four byte keys.
Parametersparams Parameters used in creation of hash table.
Returns
Pointer to hash table structure that is used in future hash table operations, or NULL on error with
rte_errno set appropriately. Possible rte_errno error values include:
• E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
• E_RTE_SECONDARY - function was called from a secondary process instance
• EINVAL - invalid parameter value passed to function
• ENOSPC - the maximum number of memzones has already been allocated
• EEXIST - a memzone with the same name already exists
• ENOMEM - no appropriate memory area found in which to create memzone
voidrte_fbk_hash_free(structrte_fbk_hash_table*ht)
Free all memory used by a hash table. Has no effect on hash tables allocated in memory zones
Parametersht Hash table to deallocate.