| rte_member.h(3) | Library Functions Manual | rte_member.h(3) |
rte_member.h
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
#include <rte_common.h>
#include <rte_jhash.h>
struct rte_member_parameters
#define RTE_MEMBER_NO_MATCH 0
#define RTE_MEMBER_ENTRIES_MAX (1 << 30)
#define RTE_MEMBER_LOOKUP_BULK_MAX 64
#define RTE_MEMBER_BUCKET_ENTRIES 16
#define RTE_MEMBER_NAMESIZE 32
#define RTE_RAND_MAX ~0LLU
#define RTE_MEMBER_SKETCH_ALWAYS_BOUNDED 0x01
#define RTE_MEMBER_SKETCH_COUNT_BYTE 0x02
typedef uint16_t member_set_t
enum rte_member_setsum_type { RTE_MEMBER_TYPE_HT =
0, RTE_MEMBER_TYPE_VBF, RTE_MEMBER_TYPE_SKETCH,
RTE_MEMBER_NUM_TYPE }
struct rte_member_setsum * rte_member_find_existing (const
char *name)
struct rte_member_setsum * rte_member_create (const struct
rte_member_parameters *params)
int rte_member_lookup (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_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)
int rte_member_add (const struct rte_member_setsum *setsum, const void
*key, member_set_t set_id)
int rte_member_add_byte_count (const struct rte_member_setsum *setsum,
const void *key, uint32_t byte_count)
int rte_member_query_count (const struct rte_member_setsum *setsum,
const void *key, uint64_t *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)
void rte_member_reset (const struct rte_member_setsum *setsum)
int rte_member_delete (const struct rte_member_setsum *setsum, const
void *key, member_set_t set_id)
RTE Membership Library
The Membership Library is an extension and generalization of a traditional filter (for example Bloom Filter and cuckoo filter) structure that has multiple usages in a variety of workloads and applications. The library is used to test if a key belongs to certain sets. Two types of such 'set-summary' structures are implemented: hash-table based (HT) and vector bloom filter (vBF). For HT setsummary, two subtypes or modes are available, cache and non-cache modes. The table below summarize some properties of the different implementations.
Definition in file rte_member.h.
Invalid set ID used to mean no match found.
Definition at line 66 of file rte_member.h.
Maximum size of hash table that can be created.
Definition at line 68 of file rte_member.h.
Maximum number of keys that can be searched as a bulk
Definition at line 70 of file rte_member.h.
Entry count per bucket in hash table based mode.
Definition at line 72 of file rte_member.h.
Maximum number of characters in setsum name.
Definition at line 74 of file rte_member.h.
Max value of the random number
Definition at line 76 of file rte_member.h.
As packets skipped in the sampling-based algorithm, the accounting results accuracy is not guaranteed in the start stage. There should be a 'convergence time' to achieve the accuracy after receiving enough packets. For sketch, use the flag if prefer always bounded mode, which only starts sampling after receiving enough packets to keep the results accuracy always bounded.
Definition at line 86 of file rte_member.h.
For sketch, use the flag if to count packet size instead of packet count
Definition at line 88 of file rte_member.h.
The set ID type that stored internally in hash table based set summary.
Definition at line 64 of file rte_member.h.
Define different set summary types
Enumerator
Definition at line 114 of file rte_member.h.
Find an existing set-summary and return a pointer to it.
Parameters
Returns
Create set-summary (SS).
Parameters
Returns
Lookup key in set-summary (SS). Single key lookup and return as soon as the first match found
Parameters
Returns
Lookup bulk of keys in set-summary (SS). Each key lookup returns as soon as the first match found
Parameters
Returns
Lookup a key in set-summary (SS) for multiple matches. The key lookup will find all matched entries (multiple match). Note that for cache mode of HT, each key can have at most one match. This is because keys with same signature that maps to same bucket will overwrite each other. So multi-match lookup should be used for vBF and non-cache HT.
Parameters
Returns
Lookup a bulk of keys in set-summary (SS) for multiple matches each key. Each key lookup will find all matched entries (multiple match). Note that for cache mode HT, each key can have at most one match. So multi-match function is mainly used for vBF and non-cache mode HT.
Parameters
Returns
Insert key into set-summary (SS).
Parameters
Returns
Add the packet byte size into the sketch.
Parameters
Returns
Query packet count for a certain flow-key.
Parameters
Returns
Report heavyhitter flow-keys into set-summary (SS).
Parameters
Returns
De-allocate memory used by set-summary.
Parameters
Reset the set-summary tables. E.g. reset bits to be 0 in BF, reset set_id in each entry to be RTE_MEMBER_NO_MATCH in HT based SS.
Parameters
Delete items from the set-summary. Note that vBF does not support deletion in current implementation. For vBF, error code of -EINVAL will be returned.
Parameters
Returns
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |