45 #ifndef _RTE_MEMBER_H_ 46 #define _RTE_MEMBER_H_ 59 #define RTE_MEMBER_NO_MATCH 0 61 #define RTE_MEMBER_ENTRIES_MAX (1 << 30) 63 #define RTE_MEMBER_LOOKUP_BULK_MAX 64 65 #define RTE_MEMBER_BUCKET_ENTRIES 16 67 #define RTE_MEMBER_NAMESIZE 32 70 #if defined(RTE_ARCH_X86) || defined(__ARM_FEATURE_CRC32) 72 #define MEMBER_HASH_FUNC rte_hash_crc 75 #define MEMBER_HASH_FUNC rte_jhash 78 extern int librte_member_logtype;
80 #define RTE_MEMBER_LOG(level, ...) \ 81 rte_log(RTE_LOG_ ## level, \ 82 librte_member_logtype, \ 83 RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \ 85 RTE_FMT_TAIL(__VA_ARGS__,))) 88 struct rte_member_setsum;
111 enum rte_member_sig_compare_function {
112 RTE_MEMBER_COMPARE_SCALAR = 0,
113 RTE_MEMBER_COMPARE_AVX2,
114 RTE_MEMBER_COMPARE_NUM
118 struct rte_member_setsum {
121 uint32_t prim_hash_seed;
122 uint32_t sec_hash_seed;
126 uint32_t bucket_mask;
128 enum rte_member_sig_compare_function sig_cmp_fn;
280 struct rte_member_setsum *
295 struct rte_member_setsum *
316 member_set_t *set_id);
340 const void **keys, uint32_t num_keys,
341 member_set_t *set_ids);
369 const void *key, uint32_t max_match_per_key,
370 member_set_t *set_id);
400 const void **keys, uint32_t num_keys,
401 uint32_t max_match_per_key,
402 uint32_t *match_count,
403 member_set_t *set_ids);
435 rte_member_add(
const struct rte_member_setsum *setsum,
const void *key,
436 member_set_t set_id);
483 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)
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