17 #include <rte_compat.h>
24 #define RTE_HASH_ENTRIES_MAX (1 << 30)
27 #define RTE_HASH_NAMESIZE 32
30 #define RTE_HASH_LOOKUP_BULK_MAX 64
31 #define RTE_HASH_LOOKUP_MULTI_MAX RTE_HASH_LOOKUP_BULK_MAX
34 #define RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT 0x01
37 #define RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD 0x02
40 #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY 0x04
43 #define RTE_HASH_EXTRA_FLAGS_EXT_TABLE 0x08
50 #define RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL 0x10
57 #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF 0x20
221 hash_sig_t sig,
void *data);
369 int __rte_experimental
371 const int32_t position);
419 hash_sig_t sig,
void **data);
462 const void *key, hash_sig_t sig);
499 uint32_t num_keys, uint64_t *hit_mask,
void *data[]);
524 uint32_t num_keys, int32_t *positions);
uint32_t(* rte_hash_function)(const void *key, uint32_t key_len, uint32_t init_val)
int rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys, uint32_t num_keys, int32_t *positions)
int rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position, void **key)
int32_t rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig)
int rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data)
struct rte_hash * rte_hash_create(const struct rte_hash_parameters *params)
int rte_hash_lookup_bulk_data(const struct rte_hash *h, const void **keys, uint32_t num_keys, uint64_t *hit_mask, void *data[])
hash_sig_t rte_hash_hash(const struct rte_hash *h, const void *key)
int __rte_experimental rte_hash_free_key_with_position(const struct rte_hash *h, const int32_t position)
int32_t rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig)
char name[RTE_HASH_NAMESIZE]
void rte_hash_reset(struct rte_hash *h)
int rte_hash_add_key_data(const struct rte_hash *h, const void *key, void *data)
void rte_hash_free(struct rte_hash *h)
int rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key, hash_sig_t sig, void **data)
int32_t rte_hash_lookup(const struct rte_hash *h, const void *key)
int32_t rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key, hash_sig_t sig, void *data)
int(* rte_hash_cmp_eq_t)(const void *key1, const void *key2, size_t key_len)
int32_t rte_hash_count(const struct rte_hash *h)
rte_hash_function hash_func
int32_t rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t sig)
uint32_t hash_func_init_val
struct rte_hash * rte_hash_find_existing(const char *name)
int32_t rte_hash_add_key(const struct rte_hash *h, const void *key)
int32_t rte_hash_del_key(const struct rte_hash *h, const void *key)
void rte_hash_set_cmp_func(struct rte_hash *h, rte_hash_cmp_eq_t func)
int32_t rte_hash_iterate(const struct rte_hash *h, const void **key, void **data, uint32_t *next)