45 #ifndef _RTE_MEMBER_H_ 46 #define _RTE_MEMBER_H_ 55 #include <rte_config.h> 60 #define RTE_MEMBER_NO_MATCH 0 62 #define RTE_MEMBER_ENTRIES_MAX (1 << 30) 64 #define RTE_MEMBER_LOOKUP_BULK_MAX 64 66 #define RTE_MEMBER_BUCKET_ENTRIES 16 68 #define RTE_MEMBER_NAMESIZE 32 71 #if defined(RTE_ARCH_X86) || defined(RTE_MACHINE_CPUFLAG_CRC32) 73 #define MEMBER_HASH_FUNC rte_hash_crc 76 #define MEMBER_HASH_FUNC rte_jhash 79 extern int librte_member_logtype;
81 #define RTE_MEMBER_LOG(level, ...) \ 82 rte_log(RTE_LOG_ ## level, \ 83 librte_member_logtype, \ 84 RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \ 86 RTE_FMT_TAIL(__VA_ARGS__,))) 89 struct rte_member_setsum;
112 enum rte_member_sig_compare_function {
113 RTE_MEMBER_COMPARE_SCALAR = 0,
114 RTE_MEMBER_COMPARE_AVX2,
115 RTE_MEMBER_COMPARE_NUM
119 struct rte_member_setsum {
122 uint32_t prim_hash_seed;
123 uint32_t sec_hash_seed;
127 uint32_t bucket_mask;
129 enum rte_member_sig_compare_function sig_cmp_fn;
281 struct rte_member_setsum *
296 struct rte_member_setsum *
341 const void **keys, uint32_t num_keys,
370 const void *key, uint32_t max_match_per_key,
401 const void **keys, uint32_t num_keys,
402 uint32_t max_match_per_key,
403 uint32_t *match_count,
436 rte_member_add(
const struct rte_member_setsum *setsum,
const void *key,
#define RTE_MEMBER_NAMESIZE
int rte_member_delete(const struct rte_member_setsum *setsum, const void *key, member_set_t set_id)
int rte_member_add(const struct rte_member_setsum *setsum, const void *key, member_set_t set_id)
int rte_member_lookup_multi(const struct rte_member_setsum *setsum, const void *key, uint32_t max_match_per_key, member_set_t *set_id)
int rte_member_lookup_multi_bulk(const struct rte_member_setsum *setsum, const void **keys, uint32_t num_keys, uint32_t max_match_per_key, uint32_t *match_count, member_set_t *set_ids)
void rte_member_free(struct rte_member_setsum *setsum)
#define __rte_cache_aligned
int rte_member_lookup_bulk(const struct rte_member_setsum *setsum, const void **keys, uint32_t num_keys, member_set_t *set_ids)
struct rte_member_setsum * rte_member_find_existing(const char *name)
int rte_member_lookup(const struct rte_member_setsum *setsum, const void *key, member_set_t *set_id)
void rte_member_reset(const struct rte_member_setsum *setsum)
struct rte_member_setsum * rte_member_create(const struct rte_member_parameters *params)
float false_positive_rate
enum rte_member_setsum_type type