![]() |
FD.io VPP
v17.04-9-g99c0734
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | adj_feature_update_t_ |
Macros | |
#define | ADJ_FROM_NODE(_node) ((ip_adjacency_t*)((char*)_node - STRUCT_OFFSET_OF(ip_adjacency_t, ia_node))) |
Typedefs | |
typedef struct adj_feature_update_t_ | adj_feature_update_ctx_t |
Functions | |
static void | adj_poison (ip_adjacency_t *adj) |
ip_adjacency_t * | adj_alloc (fib_protocol_t proto) |
static int | adj_index_is_special (adj_index_t adj_index) |
u8 * | format_ip_adjacency (u8 *s, va_list *args) |
Pretty print helper function for formatting specific adjacencies. More... | |
static void | adj_last_lock_gone (ip_adjacency_t *adj) |
void | adj_lock (adj_index_t adj_index) |
An adjacency is a representation of an attached L3 peer. More... | |
void | adj_unlock (adj_index_t adj_index) |
Release a reference counting lock on the adjacency. More... | |
u32 | adj_child_add (adj_index_t adj_index, fib_node_type_t child_type, fib_node_index_t child_index) |
Add a child dependent to an adjacency. More... | |
void | adj_child_remove (adj_index_t adj_index, u32 sibling_index) |
Remove a child dependent. More... | |
static adj_walk_rc_t | adj_feature_update_walk_cb (adj_index_t ai, void *arg) |
void | adj_feature_update (u32 sw_if_index, u8 arc_index, u8 is_enable) |
Notify the adjacency subsystem that the features settings for an interface have changed. More... | |
void | adj_walk (u32 sw_if_index, adj_walk_cb_t cb, void *ctx) |
Walk the Adjacencies on a given interface. More... | |
vnet_link_t | adj_get_link_type (adj_index_t ai) |
Return the link type of the adjacency. More... | |
u32 | adj_get_sw_if_index (adj_index_t ai) |
Return the sw interface index of the adjacency. More... | |
const u8 * | adj_get_rewrite (adj_index_t ai) |
Return the link type of the adjacency. More... | |
static fib_node_t * | adj_get_node (fib_node_index_t index) |
static void | adj_node_last_lock_gone (fib_node_t *node) |
static fib_node_back_walk_rc_t | adj_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx) |
static clib_error_t * | adj_module_init (vlib_main_t *vm) |
static clib_error_t * | adj_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
static clib_error_t * | adj_cli_counters_set (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI invoked function to enable/disable per-adj counters. More... | |
Variables | |
static ip_adjacency_t * | special_v4_miss_adj_with_index_zero |
vlib_combined_counter_main_t | adjacency_counters |
Adjacency packet counters. More... | |
ip_adjacency_t * | adj_pool |
The global adjacnecy pool. More... | |
int | adj_per_adj_counters |
Global Config for enabling per-adjacency counters. More... | |
static const fib_node_vft_t | adj_vft |
static vlib_cli_command_t | adj_show_command |
(constructor) VLIB_CLI_COMMAND (adj_show_command) More... | |
static vlib_cli_command_t | adj_cli_counters_set_command |
(constructor) VLIB_CLI_COMMAND (adj_cli_counters_set_command) More... | |
#define ADJ_FROM_NODE | ( | _node | ) | ((ip_adjacency_t*)((char*)_node - STRUCT_OFFSET_OF(ip_adjacency_t, ia_node))) |
typedef struct adj_feature_update_t_ adj_feature_update_ctx_t |
ip_adjacency_t* adj_alloc | ( | fib_protocol_t | proto | ) |
|
static |
u32 adj_child_add | ( | adj_index_t | adj_index, |
fib_node_type_t | type, | ||
fib_node_index_t | child_index | ||
) |
void adj_child_remove | ( | adj_index_t | adj_index, |
u32 | sibling_index | ||
) |
|
static |
|
static |
vnet_link_t adj_get_link_type | ( | adj_index_t | ai | ) |
|
static |
const u8* adj_get_rewrite | ( | adj_index_t | ai | ) |
u32 adj_get_sw_if_index | ( | adj_index_t | ai | ) |
|
static |
|
static |
void adj_lock | ( | adj_index_t | adj_index | ) |
An adjacency is a representation of an attached L3 peer.
Adjacency Sub-types:
The API to create and update the adjacency is very sub-type specific. This is intentional as it encourages the user to carefully consider which adjacency sub-type they are really using, and hence assign it data in the appropriate sub-type space in the union of sub-types. This prevents the adj becoming a disorganised dumping group for 'my features needs a u16 somewhere' data. It is important to enforce this approach as space in the adjacency is a premium, as we need it to fit in 1 cache line.
the API is also based around an index to an ajdacency not a raw pointer. This is so the user doesn't suffer the same limp inducing firearm injuries that the author suffered as the adjacenices can realloc.
Take a reference counting lock on the adjacency
Definition at line 198 of file adj.c.
|
static |
|
static |
|
inlinestatic |
|
static |
void adj_unlock | ( | adj_index_t | adj_index | ) |
void adj_walk | ( | u32 | sw_if_index, |
adj_walk_cb_t | cb, | ||
void * | ctx | ||
) |
Pretty print helper function for formatting specific adjacencies.
s | - input string to format |
args | - other args passed to format function such as:
|
Definition at line 100 of file adj.c.
|
static |
(constructor) VLIB_CLI_COMMAND (adj_cli_counters_set_command)
int adj_per_adj_counters |
ip_adjacency_t* adj_pool |
|
static |
(constructor) VLIB_CLI_COMMAND (adj_show_command)
|
static |
vlib_combined_counter_main_t adjacency_counters |
|
static |