1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
5 #ifndef _RTE_MEMBER_HT_H_
6 #define _RTE_MEMBER_HT_H_
12 /* Maximum number of pushes for cuckoo path in HT mode. */
13 #define RTE_MEMBER_MAX_PUSHES 50
15 typedef uint16_t member_sig_t; /* signature size is 16 bit */
17 /* The bucket struct for ht setsum */
18 struct member_ht_bucket {
19 member_sig_t sigs[RTE_MEMBER_BUCKET_ENTRIES]; /* 2-byte signature */
20 member_set_t sets[RTE_MEMBER_BUCKET_ENTRIES]; /* 2-byte set */
21 } __rte_cache_aligned;
24 rte_member_create_ht(struct rte_member_setsum *ss,
25 const struct rte_member_parameters *params);
28 rte_member_lookup_ht(const struct rte_member_setsum *setsum,
29 const void *key, member_set_t *set_id);
32 rte_member_lookup_bulk_ht(const struct rte_member_setsum *setsum,
33 const void **keys, uint32_t num_keys,
34 member_set_t *set_ids);
37 rte_member_lookup_multi_ht(const struct rte_member_setsum *setsum,
38 const void *key, uint32_t match_per_key,
39 member_set_t *set_id);
42 rte_member_lookup_multi_bulk_ht(const struct rte_member_setsum *setsum,
43 const void **keys, uint32_t num_keys, uint32_t match_per_key,
44 uint32_t *match_count,
45 member_set_t *set_ids);
48 rte_member_add_ht(const struct rte_member_setsum *setsum,
49 const void *key, member_set_t set_id);
52 rte_member_free_ht(struct rte_member_setsum *setsum);
55 rte_member_delete_ht(const struct rte_member_setsum *ss, const void *key,
59 rte_member_reset_ht(const struct rte_member_setsum *setsum);
65 #endif /* _RTE_MEMBER_HT_H_ */