|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __THROTTLE_H__
17 #define __THROTTLE_H__
36 #define THROTTLE_BITS (512)
f64 * last_seed_change_time
static u64 clib_xxhash(u64 key)
static u64 throttle_seed(throttle_t *t, u32 thread_index, f64 time_now)
struct throttle_t_ throttle_t
A throttle Used in the data plane to decide if a given hash should be throttled, i....
A throttle Used in the data plane to decide if a given hash should be throttled, i....
void throttle_init(throttle_t *t, u32 n_threads, f64 time)
static int throttle_check(throttle_t *t, u32 thread_index, u64 hash, u64 seed)
static u64 random_u64(u64 *seed)
64-bit random number generator Again, constants courtesy of Donald Knuth.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)