5 #ifndef _RTE_FBK_HASH_H_
6 #define _RTE_FBK_HASH_H_
20 #include <sys/queue.h>
28 #include <rte_config.h>
32 #ifndef RTE_FBK_HASH_INIT_VAL_DEFAULT
34 #define RTE_FBK_HASH_INIT_VAL_DEFAULT 0xFFFFFFFF
38 #define RTE_FBK_HASH_ENTRIES_MAX (1 << 20)
41 #define RTE_FBK_HASH_ENTRIES_PER_BUCKET_MAX 256
44 #define RTE_FBK_HASH_NAMESIZE 32
95 static inline uint32_t
120 uint32_t key, uint16_t
value, uint32_t bucket)
128 const uint64_t new_entry = ((uint64_t)(key) << 32) |
129 ((uint64_t)(
value) << 16) |
141 if (ht->
t[bucket + i].
entry.
key == key) {
165 uint32_t key, uint16_t
value)
187 uint32_t key, uint32_t bucket)
193 if (ht->
t[bucket + i].
entry.
key == key) {
250 uint32_t key, uint32_t bucket)
261 if (current_entry.
entry.
key == key) {
295 memset(ht->
t, 0,
sizeof(ht->
t[0]) * ht->
entries);