FD.io VPP  v19.08.3-2-gbabecb413
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)
 
static uword get_level_and_relative_time (timing_wheel_t *w, u64 cpu_time, uword *rtime_result)
 
static uword time_index_to_wheel_index (timing_wheel_t *w, uword level_index, u64 ti)
 
static uword current_time_wheel_index (timing_wheel_t *w, uword level_index)
 
static uword wheel_add (timing_wheel_t *w, word x)
 
static 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)
 
static 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)
 
static 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)
 
static u64 elt_cpu_time (timing_wheel_t *w, timing_wheel_elt_t *e)
 
static 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 u32advance_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

◆ advance_cpu_time_base()

static u32* advance_cpu_time_base ( timing_wheel_t w,
u32 expired_user_data 
)
static

Definition at line 474 of file timing_wheel.c.

◆ current_time_wheel_index()

static uword current_time_wheel_index ( timing_wheel_t w,
uword  level_index 
)
inlinestatic

Definition at line 89 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete_user_data()

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

Definition at line 263 of file timing_wheel.c.

◆ elt_cpu_time()

static u64 elt_cpu_time ( timing_wheel_t w,
timing_wheel_elt_t e 
)
inlinestatic

Definition at line 418 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ elt_is_deleted()

static uword elt_is_deleted ( timing_wheel_t w,
u32  user_data 
)
inlinestatic

Definition at line 256 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expire_bin()

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 438 of file timing_wheel.c.

+ Here is the call graph for this function:

◆ format_timing_wheel()

u8* format_timing_wheel ( u8 s,
va_list *  va 
)

Definition at line 719 of file timing_wheel.c.

+ Here is the call graph for this function:

◆ free_elt_vector()

static void free_elt_vector ( timing_wheel_t w,
timing_wheel_elt_t ev 
)
inlinestatic

Definition at line 183 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_level_and_relative_time()

static uword get_level_and_relative_time ( timing_wheel_t w,
u64  cpu_time,
uword rtime_result 
)
inlinestatic

Definition at line 56 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ insert_elt()

static void insert_elt ( timing_wheel_t w,
timing_wheel_elt_t e 
)
inlinestatic

Definition at line 411 of file timing_wheel.c.

+ Here is the call graph for this function:

◆ insert_helper()

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

Definition at line 193 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refill_level()

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 530 of file timing_wheel.c.

+ Here is the call graph for this function:

◆ rtime_to_wheel_index()

static uword rtime_to_wheel_index ( timing_wheel_t w,
uword  level_index,
uword  rtime 
)
inlinestatic

Definition at line 102 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ time_index_to_wheel_index()

static uword time_index_to_wheel_index ( timing_wheel_t w,
uword  level_index,
u64  ti 
)
inlinestatic

Definition at line 81 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ timing_wheel_advance()

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 592 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ timing_wheel_delete()

void timing_wheel_delete ( timing_wheel_t w,
u32  user_data 
)

Definition at line 331 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ timing_wheel_init()

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:

◆ timing_wheel_insert()

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

Definition at line 294 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timing_wheel_insert_helper()

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

Definition at line 227 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timing_wheel_next_expiring_elt_time()

u64 timing_wheel_next_expiring_elt_time ( timing_wheel_t w)

Definition at line 342 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timing_wheel_validate()

void timing_wheel_validate ( timing_wheel_t w)

Definition at line 164 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate_expired_elt()

static void validate_expired_elt ( timing_wheel_t w,
timing_wheel_elt_t e,
u64  current_cpu_time 
)
inlinestatic

Definition at line 424 of file timing_wheel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate_level()

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

Definition at line 109 of file timing_wheel.c.

+ Here is the caller graph for this function:

◆ wheel_add()

static uword wheel_add ( timing_wheel_t w,
word  x 
)
inlinestatic

Definition at line 96 of file timing_wheel.c.

+ Here is the caller graph for this function: