FD.io VPP  v16.06
Vector Packet Processing
timing_wheel.c File Reference
+ Include dependency graph for timing_wheel.c:

Go to the source code of this file.

Functions

void timing_wheel_init (timing_wheel_t *w, u64 current_cpu_time, f64 cpu_clocks_per_second)
 
always_inline uword get_level_and_relative_time (timing_wheel_t *w, u64 cpu_time, uword *rtime_result)
 
always_inline uword time_index_to_wheel_index (timing_wheel_t *w, uword level_index, u64 ti)
 
always_inline uword current_time_wheel_index (timing_wheel_t *w, uword level_index)
 
always_inline uword wheel_add (timing_wheel_t *w, word x)
 
always_inline uword rtime_to_wheel_index (timing_wheel_t *w, uword level_index, uword rtime)
 
static clib_error_tvalidate_level (timing_wheel_t *w, uword level_index, uword *n_elts)
 
void timing_wheel_validate (timing_wheel_t *w)
 
always_inline void free_elt_vector (timing_wheel_t *w, timing_wheel_elt_t *ev)
 
static timing_wheel_elt_tinsert_helper (timing_wheel_t *w, uword level_index, uword rtime)
 
static void timing_wheel_insert_helper (timing_wheel_t *w, u64 insert_cpu_time, u32 user_data)
 
always_inline uword elt_is_deleted (timing_wheel_t *w, u32 user_data)
 
static timing_wheel_elt_tdelete_user_data (timing_wheel_elt_t *elts, u32 user_data)
 
void timing_wheel_insert (timing_wheel_t *w, u64 insert_cpu_time, u32 user_data)
 
void timing_wheel_delete (timing_wheel_t *w, u32 user_data)
 
u64 timing_wheel_next_expiring_elt_time (timing_wheel_t *w)
 
static void insert_elt (timing_wheel_t *w, timing_wheel_elt_t *e)
 
always_inline u64 elt_cpu_time (timing_wheel_t *w, timing_wheel_elt_t *e)
 
always_inline void validate_expired_elt (timing_wheel_t *w, timing_wheel_elt_t *e, u64 current_cpu_time)
 
static u32expire_bin (timing_wheel_t *w, uword level_index, uword wheel_index, u64 advance_cpu_time, u32 *expired_user_data)
 
static void advance_cpu_time_base (timing_wheel_t *w, u32 *expired_user_data)
 
static u32refill_level (timing_wheel_t *w, uword level_index, u64 advance_cpu_time, uword from_wheel_index, uword to_wheel_index, u32 *expired_user_data)
 
u32timing_wheel_advance (timing_wheel_t *w, u64 advance_cpu_time, u32 *expired_user_data, u64 *next_expiring_element_cpu_time)
 
u8format_timing_wheel (u8 *s, va_list *va)
 

Function Documentation

static void advance_cpu_time_base ( timing_wheel_t w,
u32 expired_user_data 
)
static

Definition at line 441 of file timing_wheel.c.

+ Here is the caller graph for this function:

always_inline uword current_time_wheel_index ( timing_wheel_t w,
uword  level_index 
)

Definition at line 78 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static timing_wheel_elt_t* delete_user_data ( timing_wheel_elt_t elts,
u32  user_data 
)
static

Definition at line 243 of file timing_wheel.c.

always_inline u64 elt_cpu_time ( timing_wheel_t w,
timing_wheel_elt_t e 
)

Definition at line 385 of file timing_wheel.c.

+ Here is the caller graph for this function:

always_inline uword elt_is_deleted ( timing_wheel_t w,
u32  user_data 
)

Definition at line 236 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32* expire_bin ( timing_wheel_t w,
uword  level_index,
uword  wheel_index,
u64  advance_cpu_time,
u32 expired_user_data 
)
static

Definition at line 403 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_timing_wheel ( u8 s,
va_list *  va 
)

Definition at line 667 of file timing_wheel.c.

+ Here is the call graph for this function:

always_inline void free_elt_vector ( timing_wheel_t w,
timing_wheel_elt_t ev 
)

Definition at line 166 of file timing_wheel.c.

+ Here is the caller graph for this function:

always_inline uword get_level_and_relative_time ( timing_wheel_t w,
u64  cpu_time,
uword rtime_result 
)

Definition at line 49 of file timing_wheel.c.

+ Here is the caller graph for this function:

static void insert_elt ( timing_wheel_t w,
timing_wheel_elt_t e 
)
inlinestatic

Definition at line 378 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static timing_wheel_elt_t* insert_helper ( timing_wheel_t w,
uword  level_index,
uword  rtime 
)
static

Definition at line 176 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32* refill_level ( timing_wheel_t w,
uword  level_index,
u64  advance_cpu_time,
uword  from_wheel_index,
uword  to_wheel_index,
u32 expired_user_data 
)
static

Definition at line 490 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword rtime_to_wheel_index ( timing_wheel_t w,
uword  level_index,
uword  rtime 
)

Definition at line 87 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword time_index_to_wheel_index ( timing_wheel_t w,
uword  level_index,
u64  ti 
)

Definition at line 73 of file timing_wheel.c.

+ Here is the caller graph for this function:

u32* timing_wheel_advance ( timing_wheel_t w,
u64  advance_cpu_time,
u32 expired_user_data,
u64 next_expiring_element_cpu_time 
)

Definition at line 551 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void timing_wheel_delete ( timing_wheel_t w,
u32  user_data 
)

Definition at line 305 of file timing_wheel.c.

+ Here is the caller graph for this function:

void timing_wheel_init ( timing_wheel_t w,
u64  current_cpu_time,
f64  cpu_clocks_per_second 
)

Definition at line 21 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void timing_wheel_insert ( timing_wheel_t w,
u64  insert_cpu_time,
u32  user_data 
)

Definition at line 273 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void timing_wheel_insert_helper ( timing_wheel_t w,
u64  insert_cpu_time,
u32  user_data 
)
static

Definition at line 210 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u64 timing_wheel_next_expiring_elt_time ( timing_wheel_t w)

Definition at line 314 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void timing_wheel_validate ( timing_wheel_t w)

Definition at line 147 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void validate_expired_elt ( timing_wheel_t w,
timing_wheel_elt_t e,
u64  current_cpu_time 
)

Definition at line 389 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* validate_level ( timing_wheel_t w,
uword  level_index,
uword n_elts 
)
static

Definition at line 94 of file timing_wheel.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword wheel_add ( timing_wheel_t w,
word  x 
)

Definition at line 83 of file timing_wheel.c.

+ Here is the caller graph for this function: