FD.io VPP
v17.01-9-ge7dcee4
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | fib_walk_t_ |
A representation of a graph walk from a parent object to its children. More... | |
struct | fib_walk_queue_t_ |
A represenation of one queue of walk. More... | |
struct | fib_walk_queues_t_ |
A set of priority queues for outstanding walks. More... | |
struct | fib_walk_history_t_ |
Macros | |
#define | FIB_WALK_EVENT 0 |
There's only one event type sent to the walk process. More... | |
#define | FIB_WALK_QUEUE_STATS_NUM ((fib_walk_queue_stats_t)(FIB_WALK_COMPLETED+1)) |
#define | FIB_WALK_QUEUE_STATS |
#define | FOR_EACH_FIB_WALK_QUEUE_STATS(_wqs) |
#define | HISTOGRAM_VISITS_PER_WALK_MAX (1<<23) |
Histogram stats on the lenths of each walk in elemenets visisted. More... | |
#define | HISTOGRAM_VISITS_PER_WALK_INCR (1<<10) |
#define | HISTOGRAM_VISITS_PER_WALK_N_BUCKETS (HISTOGRAM_VISITS_PER_WALK_MAX/HISTOGRAM_VISITS_PER_WALK_INCR) |
#define | HISTORY_N_WALKS 128 |
History of state for the last 128 walks. More... | |
#define | MAX_HISTORY_REASONS 16 |
#define | FIB_WALK_N_SLEEP (FIB_WALK_LONG_SLEEP+1) |
#define | N_TIME_BUCKETS 128 |
Histogram on the amount of work done (in msecs) in each walk. More... | |
#define | TIME_INCREMENTS (N_TIME_BUCKETS/2) |
#define | N_ELTS_BUCKETS 128 |
Histogram on the number of nodes visted in each quota. More... | |
#define | USEC 1000000 |
Typedefs | |
typedef enum fib_walk_flags_t_ | fib_walk_flags_t |
The flags on a walk. More... | |
typedef struct fib_walk_t_ | fib_walk_t |
A representation of a graph walk from a parent object to its children. More... | |
typedef enum fib_walk_queue_stats_t_ | fib_walk_queue_stats_t |
Statistics maintained per-walk queue. More... | |
typedef struct fib_walk_queue_t_ | fib_walk_queue_t |
A represenation of one queue of walk. More... | |
typedef struct fib_walk_queues_t_ | fib_walk_queues_t |
A set of priority queues for outstanding walks. More... | |
typedef struct fib_walk_history_t_ | fib_walk_history_t |
typedef enum fib_walk_advance_rc_t_ | fib_walk_advance_rc_t |
return code when advancing a walk More... | |
typedef enum fib_walk_sleep_type_t_ | fib_walk_sleep_type_t |
Enurmerate the times of sleep between walks More... | |
Enumerations | |
enum | fib_walk_flags_t_ { FIB_WALK_FLAG_SYNC = (1 << 0), FIB_WALK_FLAG_ASYNC = (1 << 1), FIB_WALK_FLAG_EXECUTING = (1 << 2) } |
The flags on a walk. More... | |
enum | fib_walk_queue_stats_t_ { FIB_WALK_SCHEDULED, FIB_WALK_COMPLETED } |
Statistics maintained per-walk queue. More... | |
enum | fib_walk_advance_rc_t_ { FIB_WALK_ADVANCE_DONE, FIB_WALK_ADVANCE_MORE, FIB_WALK_ADVANCE_MERGE } |
return code when advancing a walk More... | |
enum | fib_walk_sleep_type_t_ { FIB_WALK_SHORT_SLEEP, FIB_WALK_LONG_SLEEP } |
Enurmerate the times of sleep between walks More... | |
Variables | |
static fib_walk_t * | fib_walk_pool |
The pool of all walk objects. More... | |
static const char *const | fib_walk_queue_stats_names [] = FIB_WALK_QUEUE_STATS |
The names of the walk stats. More... | |
static const char *const | fib_node_bw_reason_names [] = FIB_NODE_BW_REASONS |
The names of the walk reasons. More... | |
static fib_walk_queues_t | fib_walk_queues |
The global queues of outstanding walks. More... | |
static const char *const | fib_walk_priority_names [] = FIB_WALK_PRIORITIES |
The names of the walk priorities. More... | |
static u64 | fib_walk_hist_vists_per_walk [HISTOGRAM_VISITS_PER_WALK_N_BUCKETS] |
static u32 | history_last_walk_pos |
static fib_walk_history_t | fib_walk_history [HISTORY_N_WALKS] |
static f64 | fib_walk_sleep_duration [] |
Durations for the sleep types. More... | |
static f64 | quota = 1e-4 |
The time quota for a walk. More... | |
static u64 | fib_walk_work_time_taken [N_TIME_BUCKETS] |
static u32 | fib_walk_work_nodes_visisted_incr = 2 |
static u64 | fib_walk_work_nodes_visited [N_ELTS_BUCKETS] |
static u64 | fib_walk_sleep_lengths [2] |
Histogram of the sleep lengths. More... | |
static vlib_node_registration_t | fib_walk_process_node |
(constructor) VLIB_REGISTER_NODE (fib_walk_process_node) More... | |
static const fib_node_vft_t | fib_walk_vft |
The FIB walk's graph node virtual function table. More... | |
static vlib_cli_command_t | fib_walk_show_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_show_command) More... | |
static vlib_cli_command_t | fib_walk_set_quota_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_quota_command) More... | |
static vlib_cli_command_t | fib_walk_set_histogram_elements_size_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_histogram_elements_size_command) More... | |
static vlib_cli_command_t | fib_walk_clear_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_clear_command) More... | |
#define FIB_WALK_EVENT 0 |
There's only one event type sent to the walk process.
Definition at line 101 of file fib_walk.c.
#define FIB_WALK_N_SLEEP (FIB_WALK_LONG_SLEEP+1) |
Definition at line 387 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS |
Definition at line 113 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS_NUM ((fib_walk_queue_stats_t)(FIB_WALK_COMPLETED+1)) |
Definition at line 111 of file fib_walk.c.
#define FOR_EACH_FIB_WALK_QUEUE_STATS | ( | _wqs | ) |
Definition at line 118 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_INCR (1<<10) |
Definition at line 171 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_MAX (1<<23) |
Histogram stats on the lenths of each walk in elemenets visisted.
Store upto 1<<23 elements in increments of 1<<10
Definition at line 170 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_N_BUCKETS (HISTOGRAM_VISITS_PER_WALK_MAX/HISTOGRAM_VISITS_PER_WALK_INCR) |
Definition at line 172 of file fib_walk.c.
#define HISTORY_N_WALKS 128 |
History of state for the last 128 walks.
Definition at line 179 of file fib_walk.c.
#define MAX_HISTORY_REASONS 16 |
Definition at line 180 of file fib_walk.c.
#define N_ELTS_BUCKETS 128 |
Histogram on the number of nodes visted in each quota.
Definition at line 413 of file fib_walk.c.
#define N_TIME_BUCKETS 128 |
Histogram on the amount of work done (in msecs) in each walk.
Definition at line 406 of file fib_walk.c.
#define TIME_INCREMENTS (N_TIME_BUCKETS/2) |
Definition at line 407 of file fib_walk.c.
#define USEC 1000000 |
typedef enum fib_walk_advance_rc_t_ fib_walk_advance_rc_t |
return code when advancing a walk
typedef enum fib_walk_flags_t_ fib_walk_flags_t |
The flags on a walk.
typedef struct fib_walk_history_t_ fib_walk_history_t |
typedef enum fib_walk_queue_stats_t_ fib_walk_queue_stats_t |
Statistics maintained per-walk queue.
typedef struct fib_walk_queue_t_ fib_walk_queue_t |
A represenation of one queue of walk.
typedef struct fib_walk_queues_t_ fib_walk_queues_t |
A set of priority queues for outstanding walks.
typedef enum fib_walk_sleep_type_t_ fib_walk_sleep_type_t |
Enurmerate the times of sleep between walks
typedef struct fib_walk_t_ fib_walk_t |
A representation of a graph walk from a parent object to its children.
return code when advancing a walk
Enumerator | |
---|---|
FIB_WALK_ADVANCE_DONE |
The walk is complete. |
FIB_WALK_ADVANCE_MORE |
the walk has more work |
FIB_WALK_ADVANCE_MERGE |
The walk merged with the one in front. |
Definition at line 299 of file fib_walk.c.
enum fib_walk_flags_t_ |
The flags on a walk.
Definition at line 22 of file fib_walk.c.
Statistics maintained per-walk queue.
Enumerator | |
---|---|
FIB_WALK_SCHEDULED | |
FIB_WALK_COMPLETED |
Definition at line 106 of file fib_walk.c.
Enurmerate the times of sleep between walks
Enumerator | |
---|---|
FIB_WALK_SHORT_SLEEP | |
FIB_WALK_LONG_SLEEP |
Definition at line 381 of file fib_walk.c.
|
static |
Advance the walk one element in its work list.
Definition at line 319 of file fib_walk.c.
|
static |
Allocate a new walk object.
Definition at line 558 of file fib_walk.c.
void fib_walk_async | ( | fib_node_type_t | parent_type, |
fib_node_index_t | parent_index, | ||
fib_walk_priority_t | prio, | ||
fib_node_back_walk_ctx_t * | ctx | ||
) |
Definition at line 620 of file fib_walk.c.
|
static |
Another back walk has reach this walk.
Megre them so there is only one left. It is this node being visited that will remain, so copy or merge the context onto it.
Definition at line 814 of file fib_walk.c.
|
static |
Definition at line 1091 of file fib_walk.c.
|
static |
Definition at line 243 of file fib_walk.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Walk objects are not parents, nor are they locked.
are no-ops
Definition at line 796 of file fib_walk.c.
void fib_walk_module_init | ( | void | ) |
Definition at line 864 of file fib_walk.c.
|
static |
Enqueue a walk onto the appropriate priority queue.
Then signal the background process there is work to do.
Definition at line 595 of file fib_walk.c.
|
static |
The 'fib-walk' process's main loop.
Definition at line 517 of file fib_walk.c.
f64 fib_walk_process_queues | ( | vlib_main_t * | vm, |
const f64 | quota | ||
) |
Service the queues This is not declared static so that it can be unit tested - i know i know...
Definition at line 427 of file fib_walk.c.
|
static |
Definition at line 233 of file fib_walk.c.
u32 fib_walk_queue_get_size | ( | fib_walk_priority_t | prio | ) |
Definition at line 227 of file fib_walk.c.
|
static |
|
static |
|
static |
void fib_walk_sync | ( | fib_node_type_t | parent_type, |
fib_node_index_t | parent_index, | ||
fib_node_back_walk_ctx_t * | ctx | ||
) |
Back walk all the children of a FIB node.
note this is a synchronous depth first walk. Children visited may propagate the walk to thier children. Other children node types may not propagate, synchronously but instead queue the walk for later async completion.
Definition at line 674 of file fib_walk.c.
Definition at line 877 of file fib_walk.c.
Definition at line 193 of file fib_walk.c.
Definition at line 202 of file fib_walk.c.
|
static |
The names of the walk reasons.
Definition at line 130 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_clear_command)
Definition at line 1104 of file fib_walk.c.
|
static |
Definition at line 174 of file fib_walk.c.
|
static |
Definition at line 190 of file fib_walk.c.
|
static |
The pool of all walk objects.
Definition at line 96 of file fib_walk.c.
|
static |
The names of the walk priorities.
Definition at line 164 of file fib_walk.c.
|
static |
(constructor) VLIB_REGISTER_NODE (fib_walk_process_node)
Definition at line 547 of file fib_walk.c.
|
static |
The names of the walk stats.
Definition at line 126 of file fib_walk.c.
|
static |
The global queues of outstanding walks.
Definition at line 159 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_histogram_elements_size_command)
Definition at line 1084 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_quota_command)
Definition at line 1058 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_show_command)
Definition at line 1032 of file fib_walk.c.
|
static |
Durations for the sleep types.
Definition at line 392 of file fib_walk.c.
|
static |
Histogram of the sleep lengths.
Definition at line 420 of file fib_walk.c.
|
static |
The FIB walk's graph node virtual function table.
Definition at line 857 of file fib_walk.c.
|
static |
Definition at line 414 of file fib_walk.c.
|
static |
Definition at line 415 of file fib_walk.c.
|
static |
Definition at line 408 of file fib_walk.c.
|
static |
Definition at line 181 of file fib_walk.c.
|
static |
The time quota for a walk.
When more than this amount of time is spent, the walk process will yield.
Definition at line 401 of file fib_walk.c.