FD.io VPP
v18.01.2-1-g9b554f3
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_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... | |
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 | |
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... | |
static vlib_cli_command_t | fib_walk_process_command |
(constructor) VLIB_CLI_COMMAND (fib_walk_process_command) More... | |
#define FIB_WALK_N_SLEEP (FIB_WALK_LONG_SLEEP+1) |
Definition at line 396 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS |
Definition at line 108 of file fib_walk.c.
#define FIB_WALK_QUEUE_STATS_NUM ((fib_walk_queue_stats_t)(FIB_WALK_COMPLETED+1)) |
Definition at line 106 of file fib_walk.c.
#define FOR_EACH_FIB_WALK_QUEUE_STATS | ( | _wqs | ) |
Definition at line 113 of file fib_walk.c.
#define HISTOGRAM_VISITS_PER_WALK_INCR (1<<10) |
Definition at line 166 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 165 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 167 of file fib_walk.c.
#define HISTORY_N_WALKS 128 |
History of state for the last 128 walks.
Definition at line 174 of file fib_walk.c.
#define MAX_HISTORY_REASONS 16 |
Definition at line 175 of file fib_walk.c.
#define N_ELTS_BUCKETS 128 |
Histogram on the number of nodes visted in each quota.
Definition at line 432 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 425 of file fib_walk.c.
#define TIME_INCREMENTS (N_TIME_BUCKETS/2) |
Definition at line 426 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 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 303 of file fib_walk.c.
enum fib_walk_flags_t_ |
The flags on a walk.
Definition at line 22 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 534 of file fib_walk.c.
Statistics maintained per-walk queue.
Enumerator | |
---|---|
FIB_WALK_SCHEDULED | |
FIB_WALK_COMPLETED |
Definition at line 101 of file fib_walk.c.
Enurmerate the times of sleep between walks
Enumerator | |
---|---|
FIB_WALK_SHORT_SLEEP | |
FIB_WALK_LONG_SLEEP |
Definition at line 390 of file fib_walk.c.
|
static |
Advance the walk one element in its work list.
Definition at line 323 of file fib_walk.c.
|
static |
Allocate a new walk object.
Definition at line 611 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 673 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 867 of file fib_walk.c.
|
static |
Definition at line 1144 of file fib_walk.c.
|
static |
Definition at line 238 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 849 of file fib_walk.c.
void fib_walk_module_init | ( | void | ) |
Definition at line 917 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 648 of file fib_walk.c.
|
static |
The 'fib-walk' process's main loop.
Definition at line 545 of file fib_walk.c.
void fib_walk_process_disable | ( | void | ) |
Definition at line 1173 of file fib_walk.c.
void fib_walk_process_enable | ( | void | ) |
Definition at line 1164 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 446 of file fib_walk.c.
|
static |
Definition at line 228 of file fib_walk.c.
u32 fib_walk_queue_get_size | ( | fib_walk_priority_t | prio | ) |
Definition at line 222 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 727 of file fib_walk.c.
Definition at line 930 of file fib_walk.c.
Definition at line 188 of file fib_walk.c.
Definition at line 197 of file fib_walk.c.
|
static |
The names of the walk reasons.
Definition at line 125 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_clear_command)
Definition at line 1157 of file fib_walk.c.
|
static |
Definition at line 169 of file fib_walk.c.
|
static |
Definition at line 185 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 159 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_process_command)
Definition at line 1201 of file fib_walk.c.
|
static |
(constructor) VLIB_REGISTER_NODE (fib_walk_process_node)
Definition at line 600 of file fib_walk.c.
|
static |
The names of the walk stats.
Definition at line 121 of file fib_walk.c.
|
static |
The global queues of outstanding walks.
Definition at line 154 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_histogram_elements_size_command)
Definition at line 1137 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_set_quota_command)
Definition at line 1111 of file fib_walk.c.
|
static |
(constructor) VLIB_CLI_COMMAND (fib_walk_show_command)
Definition at line 1085 of file fib_walk.c.
|
static |
Durations for the sleep types.
Definition at line 401 of file fib_walk.c.
|
static |
Histogram of the sleep lengths.
Definition at line 439 of file fib_walk.c.
|
static |
The FIB walk's graph node virtual function table.
Definition at line 910 of file fib_walk.c.
|
static |
Definition at line 433 of file fib_walk.c.
|
static |
Definition at line 434 of file fib_walk.c.
|
static |
Definition at line 427 of file fib_walk.c.
|
static |
Definition at line 176 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 420 of file fib_walk.c.