FD.io VPP
v21.06-3-gbb25fbf28
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 representation 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_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 visited. 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_DBG(_walk, _fmt, _args...) |
#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 representation 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... | |
typedef enum fib_walk_process_event_t_ | fib_walk_process_event |
Events sent to the FIB walk process. 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... | |
enum | fib_walk_process_event_t_ { FIB_WALK_PROCESS_EVENT_DATA, FIB_WALK_PROCESS_EVENT_ENABLE, FIB_WALK_PROCESS_EVENT_DISABLE } |
Events sent to the FIB walk process. More... | |
Variables | |
vlib_log_class_t | fib_walk_logger |
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_visited_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... | |
static vlib_cli_command_t | fib_walk_process_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_process_command) More... | |
#define FIB_WALK_DBG | ( | _walk, | |
_fmt, | |||
_args... | |||
) |
Definition at line 191 of file fib_walk.c.
#define FIB_WALK_N_SLEEP (FIB_WALK_LONG_SLEEP+1) |
Definition at line 411 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS |
Definition at line 110 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS_NUM ((fib_walk_queue_stats_t)(FIB_WALK_COMPLETED+1)) |
Definition at line 108 of file fib_walk.c.
#define FOR_EACH_FIB_WALK_QUEUE_STATS | ( | _wqs | ) |
Definition at line 115 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_INCR (1<<10) |
Definition at line 168 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_MAX (1<<23) |
Histogram stats on the lenths of each walk in elemenets visited.
Store upto 1<<23 elements in increments of 1<<10
Definition at line 167 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 169 of file fib_walk.c.
#define HISTORY_N_WALKS 128 |
History of state for the last 128 walks.
Definition at line 176 of file fib_walk.c.
#define MAX_HISTORY_REASONS 16 |
Definition at line 177 of file fib_walk.c.
#define N_ELTS_BUCKETS 128 |
Histogram on the number of nodes visted in each quota.
Definition at line 447 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 440 of file fib_walk.c.
#define TIME_INCREMENTS (N_TIME_BUCKETS/2) |
Definition at line 441 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_process_event_t_ fib_walk_process_event |
Events sent to the FIB walk process.
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 representation 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 316 of file fib_walk.c.
enum fib_walk_flags_t_ |
The flags on a walk.
Definition at line 24 of file fib_walk.c.
Events sent to the FIB walk process.
Enumerator | |
---|---|
FIB_WALK_PROCESS_EVENT_DATA | |
FIB_WALK_PROCESS_EVENT_ENABLE | |
FIB_WALK_PROCESS_EVENT_DISABLE |
Definition at line 549 of file fib_walk.c.
Statistics maintained per-walk queue.
Enumerator | |
---|---|
FIB_WALK_SCHEDULED | |
FIB_WALK_COMPLETED |
Definition at line 103 of file fib_walk.c.
Enurmerate the times of sleep between walks.
Enumerator | |
---|---|
FIB_WALK_SHORT_SLEEP | |
FIB_WALK_LONG_SLEEP |
Definition at line 405 of file fib_walk.c.
|
static |
Advance the walk one element in its work list.
Definition at line 336 of file fib_walk.c.
|
static |
Allocate a new walk object.
Definition at line 626 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 688 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 894 of file fib_walk.c.
|
static |
|
static |
Definition at line 251 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 876 of file fib_walk.c.
void fib_walk_module_init | ( | void | ) |
Definition at line 944 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 663 of file fib_walk.c.
|
static |
The 'fib-walk' process's main loop.
Definition at line 560 of file fib_walk.c.
void fib_walk_process_disable | ( | void | ) |
Definition at line 1211 of file fib_walk.c.
void fib_walk_process_enable | ( | void | ) |
Definition at line 1202 of file fib_walk.c.
|
static |
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 461 of file fib_walk.c.
|
static |
Definition at line 241 of file fib_walk.c.
u32 fib_walk_queue_get_size | ( | fib_walk_priority_t | prio | ) |
Definition at line 235 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 their children. Other children node types may not propagate, synchronously but instead queue the walk for later async completion.
Definition at line 745 of file fib_walk.c.
Definition at line 958 of file fib_walk.c.
|
static |
The names of the walk reasons.
Definition at line 127 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_clear_command)
Definition at line 1195 of file fib_walk.c.
|
static |
Definition at line 171 of file fib_walk.c.
|
static |
Definition at line 187 of file fib_walk.c.
vlib_log_class_t fib_walk_logger |
Definition at line 19 of file fib_walk.c.
|
static |
The pool of all walk objects.
Definition at line 98 of file fib_walk.c.
|
static |
The names of the walk priorities.
Definition at line 161 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_process_command)
Definition at line 1239 of file fib_walk.c.
|
static |
(constructor) VLIB_REGISTER_NODE (fib_walk_process_node)
Definition at line 615 of file fib_walk.c.
|
static |
The names of the walk stats.
Definition at line 123 of file fib_walk.c.
|
static |
The global queues of outstanding walks.
Definition at line 156 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_histogram_elements_size_command)
Definition at line 1175 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_quota_command)
Definition at line 1149 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_show_command)
Definition at line 1123 of file fib_walk.c.
|
static |
Durations for the sleep types.
Definition at line 416 of file fib_walk.c.
|
static |
Histogram of the sleep lengths.
Definition at line 454 of file fib_walk.c.
|
static |
The FIB walk's graph node virtual function table.
Definition at line 937 of file fib_walk.c.
|
static |
Definition at line 449 of file fib_walk.c.
|
static |
Definition at line 448 of file fib_walk.c.
|
static |
Definition at line 442 of file fib_walk.c.
|
static |
Definition at line 178 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 435 of file fib_walk.c.