66#define RTE_MEMBER_NO_MATCH 0
68#define RTE_MEMBER_ENTRIES_MAX (1 << 30)
70#define RTE_MEMBER_LOOKUP_BULK_MAX 64
72#define RTE_MEMBER_BUCKET_ENTRIES 16
74#define RTE_MEMBER_NAMESIZE 32
76#define RTE_RAND_MAX ~0LLU
86#define RTE_MEMBER_SKETCH_ALWAYS_BOUNDED 0x01
88#define RTE_MEMBER_SKETCH_COUNT_BYTE 0x02
91#if defined(RTE_ARCH_X86) || defined(__ARM_FEATURE_CRC32)
93#define MEMBER_HASH_FUNC rte_hash_crc
96#define MEMBER_HASH_FUNC rte_jhash
104struct rte_member_setsum;
117 RTE_MEMBER_TYPE_SKETCH,
122enum rte_member_sig_compare_function {
123 RTE_MEMBER_COMPARE_SCALAR = 0,
124 RTE_MEMBER_COMPARE_AVX2,
125 RTE_MEMBER_COMPARE_NUM
129typedef void (*sketch_update_fn_t)(
const struct rte_member_setsum *ss,
134typedef uint64_t (*sketch_lookup_fn_t)(
const struct rte_member_setsum *ss,
138typedef void (*sketch_delete_fn_t)(
const struct rte_member_setsum *ss,
145 uint32_t prim_hash_seed;
146 uint32_t sec_hash_seed;
150 uint32_t bucket_mask;
152 enum rte_member_sig_compare_function sig_cmp_fn;
167 double converge_thresh;
170 uint64_t *hash_seeds;
171 sketch_update_fn_t sketch_update;
172 sketch_lookup_fn_t sketch_lookup;
173 sketch_delete_fn_t sketch_delete;
341struct rte_member_setsum *
353struct rte_member_setsum *
392 const void **keys, uint32_t num_keys,
418 const void *key, uint32_t max_match_per_key,
446 const void **keys, uint32_t num_keys,
447 uint32_t max_match_per_key,
448 uint32_t *match_count,
495 const void *key, uint32_t byte_count);
511 const void *key, uint64_t *count);
529 void **keys, uint64_t *counts);
#define __rte_cache_aligned
struct rte_member_setsum * rte_member_find_existing(const char *name)
int rte_member_add(const struct rte_member_setsum *setsum, const void *key, member_set_t set_id)
int rte_member_lookup_bulk(const struct rte_member_setsum *setsum, const void **keys, uint32_t num_keys, member_set_t *set_ids)
int rte_member_query_count(const struct rte_member_setsum *setsum, const void *key, uint64_t *count)
int rte_member_lookup(const struct rte_member_setsum *setsum, const void *key, member_set_t *set_id)
int rte_member_delete(const struct rte_member_setsum *setsum, const void *key, member_set_t set_id)
struct rte_member_setsum * rte_member_create(const struct rte_member_parameters *params)
int rte_member_report_heavyhitter(const struct rte_member_setsum *setsum, void **keys, uint64_t *counts)
#define RTE_MEMBER_NAMESIZE
void rte_member_free(struct rte_member_setsum *setsum)
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)
void rte_member_reset(const struct rte_member_setsum *setsum)
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)
int rte_member_add_byte_count(const struct rte_member_setsum *setsum, const void *key, uint32_t byte_count)
float false_positive_rate
enum rte_member_setsum_type type