Go to the source code of this file.
|
static_always_inline lb_hash_t * | lb_hash_alloc (u32 buckets, u32 timeout) |
|
static_always_inline void | lb_hash_free (lb_hash_t *h) |
|
static_always_inline u32 | lb_hash_hash (u64 k0, u64 k1, u64 k2, u64 k3, u64 k4) |
|
static_always_inline void | lb_hash_prefetch_bucket (lb_hash_t *ht, u32 hash) |
|
static_always_inline void | lb_hash_get (lb_hash_t *ht, u32 hash, u32 vip, u32 time_now, u32 *available_index, u32 *found_value) |
|
static_always_inline u32 | lb_hash_available_value (lb_hash_t *h, u32 hash, u32 available_index) |
|
static_always_inline void | lb_hash_put (lb_hash_t *h, u32 hash, u32 value, u32 vip, u32 available_index, u32 time_now) |
|
static_always_inline u32 | lb_hash_elts (lb_hash_t *h, u32 time_now) |
|
#define LB_HASH_DO_NOT_USE_SSE_BUCKETS 0 |
#define lb_hash_foreach_bucket |
( |
|
h, |
|
|
|
bucket |
|
) |
| |
Value:for (bucket = (
h)->buckets; \
bucket++)
#define lb_hash_nbuckets(h)
Definition at line 66 of file lbhash.h.
#define lb_hash_foreach_entry |
( |
|
h, |
|
|
|
bucket, |
|
|
|
i |
|
) |
| |
Value:sll srl srl sll sra u16x4 i
#define LBHASH_ENTRY_PER_BUCKET
vppinfra already includes tons of different hash tables.
#define lb_hash_foreach_bucket(h, bucket)
Definition at line 71 of file lbhash.h.
#define lb_hash_foreach_valid_entry |
( |
|
h, |
|
|
|
bucket, |
|
|
|
i, |
|
|
|
now |
|
) |
| |
Value:sll srl srl sll sra u16x4 i
#define clib_u32_loop_gt(a, b)
32 bits integer comparison for running values.
#define lb_hash_foreach_entry(h, bucket, i)
Definition at line 75 of file lbhash.h.
#define lb_hash_nbuckets |
( |
|
h | ) |
(((h)->buckets_mask) + 1) |
#define LBHASH_ENTRY_PER_BUCKET 4 |
vppinfra already includes tons of different hash tables.
MagLev flow table is a bit different. It has to be very efficient for both writing and reading operations. But it does not need to be 100% reliable (write can fail). It also needs to recycle old entries in a lazy way.
This hash table is the most dummy hash table you can do. Fixed total size, fixed bucket size. Advantage is that it could be very efficient (maybe).
Definition at line 41 of file lbhash.h.