54 #ifndef _RTE_MEMBER_H_ 55 #define _RTE_MEMBER_H_ 70 #define RTE_MEMBER_NO_MATCH 0 72 #define RTE_MEMBER_ENTRIES_MAX (1 << 30) 74 #define RTE_MEMBER_LOOKUP_BULK_MAX 64 76 #define RTE_MEMBER_BUCKET_ENTRIES 16 78 #define RTE_MEMBER_NAMESIZE 32 80 #define RTE_RAND_MAX ~0LLU 90 #define RTE_MEMBER_SKETCH_ALWAYS_BOUNDED 0x01 92 #define RTE_MEMBER_SKETCH_COUNT_BYTE 0x02 95 #if defined(RTE_ARCH_X86) || defined(__ARM_FEATURE_CRC32) 97 #define MEMBER_HASH_FUNC rte_hash_crc 100 #define MEMBER_HASH_FUNC rte_jhash 104 struct rte_member_setsum;
117 RTE_MEMBER_TYPE_SKETCH,
122 enum rte_member_sig_compare_function {
123 RTE_MEMBER_COMPARE_SCALAR = 0,
124 RTE_MEMBER_COMPARE_AVX2,
125 RTE_MEMBER_COMPARE_NUM
129 typedef void (*sketch_update_fn_t)(
const struct rte_member_setsum *ss,
134 typedef uint64_t (*sketch_lookup_fn_t)(
const struct rte_member_setsum *ss,
138 typedef 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;
341 struct rte_member_setsum *
353 struct rte_member_setsum *
371 member_set_t *set_id);
392 const void **keys, uint32_t num_keys,
393 member_set_t *set_ids);
418 const void *key, uint32_t max_match_per_key,
419 member_set_t *set_id);
446 const void **keys, uint32_t num_keys,
447 uint32_t max_match_per_key,
448 uint32_t *match_count,
449 member_set_t *set_ids);
478 rte_member_add(
const struct rte_member_setsum *setsum,
const void *key,
479 member_set_t set_id);
495 const void *key, uint32_t byte_count);
511 const void *key, uint64_t *count);
529 void **keys, uint64_t *counts);
569 member_set_t set_id);
#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)
#define __rte_cache_aligned
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)
int rte_member_report_heavyhitter(const struct rte_member_setsum *setsum, void **keys, uint64_t *counts)
void rte_member_free(struct rte_member_setsum *setsum)
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)
int rte_member_query_count(const struct rte_member_setsum *setsum, const void *key, uint64_t *count)
float false_positive_rate