FD.io VPP  v16.12-rc0-308-g931be3a
Vector Packet Processing
fib_entry.c File Reference
+ Include dependency graph for fib_entry.c:

Go to the source code of this file.

Functions

fib_entry_tfib_entry_get (fib_node_index_t index)
 
static fib_node_tfib_entry_get_node (fib_node_index_t index)
 
fib_node_index_t fib_entry_get_index (const fib_entry_t *fib_entry)
 
static fib_protocol_t fib_entry_get_proto (const fib_entry_t *fib_entry)
 
static fib_forward_chain_type_t fib_entry_chain_type_fixup (const fib_entry_t *entry, fib_forward_chain_type_t fct)
 Turn the chain type requested by the client into the one they really wanted. More...
 
fib_forward_chain_type_t fib_entry_get_default_chain_type (const fib_entry_t *fib_entry)
 
u8format_fib_entry (u8 *s, va_list *args)
 
static fib_entry_tfib_entry_from_fib_node (fib_node_t *node)
 
static void fib_entry_last_lock_gone (fib_node_t *node)
 
static fib_entry_src_tfib_entry_get_best_src_i (const fib_entry_t *fib_entry)
 
static fib_source_t fib_entry_src_get_source (const fib_entry_src_t *esrc)
 
static fib_entry_flag_t fib_entry_src_get_flags (const fib_entry_src_t *esrc)
 
fib_entry_flag_t fib_entry_get_flags (fib_node_index_t fib_entry_index)
 
static fib_node_back_walk_rc_t fib_entry_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 
static void fib_entry_show_memory (void)
 
void fib_entry_contribute_urpf (fib_node_index_t entry_index, index_t urpf)
 Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its children. More...
 
void fib_entry_contribute_forwarding (fib_node_index_t fib_entry_index, fib_forward_chain_type_t type, dpo_id_t *dpo)
 
const dpo_id_tfib_entry_contribute_ip_forwarding (fib_node_index_t fib_entry_index)
 
adj_index_t fib_entry_get_adj (fib_node_index_t fib_entry_index)
 
fib_node_index_t fib_entry_get_path_list (fib_node_index_t fib_entry_index)
 
u32 fib_entry_child_add (fib_node_index_t fib_entry_index, fib_node_type_t child_type, fib_node_index_t child_index)
 
void fib_entry_child_remove (fib_node_index_t fib_entry_index, u32 sibling_index)
 
static fib_entry_tfib_entry_alloc (u32 fib_index, const fib_prefix_t *prefix, fib_node_index_t *fib_entry_index)
 
static void fib_entry_post_flag_update_actions (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t old_flags)
 
static void fib_entry_post_install_actions (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t old_flags)
 
fib_node_index_t fib_entry_create (u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
 
fib_node_index_t fib_entry_create_special (u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
static void fib_entry_post_update_actions (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t old_flags)
 
static void fib_entry_source_change (fib_entry_t *fib_entry, fib_source_t best_source, fib_source_t new_source, fib_entry_flag_t old_flags)
 
void fib_entry_special_add (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
void fib_entry_special_update (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
void fib_entry_path_add (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *rpath)
 
fib_entry_src_flag_t fib_entry_path_remove (fib_node_index_t fib_entry_index, fib_source_t source, const fib_route_path_t *rpath)
 
fib_entry_src_flag_t fib_entry_special_remove (fib_node_index_t fib_entry_index, fib_source_t source)
 
fib_entry_src_flag_t fib_entry_delete (fib_node_index_t fib_entry_index, fib_source_t source)
 fib_entry_delete More...
 
void fib_entry_update (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
 fib_entry_update More...
 
void fib_entry_cover_changed (fib_node_index_t fib_entry_index)
 
void fib_entry_cover_updated (fib_node_index_t fib_entry_index)
 
int fib_entry_recursive_loop_detect (fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
 
u32 fib_entry_get_resolving_interface (fib_node_index_t entry_index)
 
fib_source_t fib_entry_get_best_source (fib_node_index_t entry_index)
 
static int fib_ip4_address_compare (ip4_address_t *a1, ip4_address_t *a2)
 
static int fib_ip6_address_compare (ip6_address_t *a1, ip6_address_t *a2)
 
static int fib_entry_cmp (fib_node_index_t fib_entry_index1, fib_node_index_t fib_entry_index2)
 
int fib_entry_cmp_for_sort (void *i1, void *i2)
 
void fib_entry_lock (fib_node_index_t fib_entry_index)
 
void fib_entry_unlock (fib_node_index_t fib_entry_index)
 
void fib_entry_module_init (void)
 
void fib_entry_get_prefix (fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
 
u32 fib_entry_get_fib_index (fib_node_index_t fib_entry_index)
 
u32 fib_entry_pool_size (void)
 
static clib_error_tshow_fib_entry_command (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static const char * fib_source_names [] = FIB_SOURCES
 
static const char * fib_attribute_names [] = FIB_ENTRY_ATTRIBUTES
 
static fib_entry_tfib_entry_pool
 
static const fib_node_vft_t fib_entry_vft
 
static vlib_cli_command_t show_fib_entry
 (constructor) VLIB_CLI_COMMAND (show_fib_entry) More...
 

Function Documentation

static fib_entry_t* fib_entry_alloc ( u32  fib_index,
const fib_prefix_t prefix,
fib_node_index_t fib_entry_index 
)
static

Definition at line 570 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_node_back_walk_rc_t fib_entry_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Definition at line 387 of file fib_entry.c.

+ Here is the call graph for this function:

static fib_forward_chain_type_t fib_entry_chain_type_fixup ( const fib_entry_t entry,
fib_forward_chain_type_t  fct 
)
static

Turn the chain type requested by the client into the one they really wanted.

Definition at line 72 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_child_add ( fib_node_index_t  fib_entry_index,
fib_node_type_t  child_type,
fib_node_index_t  child_index 
)

Definition at line 550 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_child_remove ( fib_node_index_t  fib_entry_index,
u32  sibling_index 
)

Definition at line 561 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int fib_entry_cmp ( fib_node_index_t  fib_entry_index1,
fib_node_index_t  fib_entry_index2 
)
static

Definition at line 1405 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_cmp_for_sort ( void *  i1,
void *  i2 
)

Definition at line 1441 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_contribute_forwarding ( fib_node_index_t  fib_entry_index,
fib_forward_chain_type_t  type,
dpo_id_t dpo 
)

Definition at line 483 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const dpo_id_t* fib_entry_contribute_ip_forwarding ( fib_node_index_t  fib_entry_index)

Definition at line 515 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_contribute_urpf ( fib_node_index_t  entry_index,
index_t  urpf 
)

Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its children.

Definition at line 467 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_cover_changed ( fib_node_index_t  fib_entry_index)

Definition at line 1164 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_cover_updated ( fib_node_index_t  fib_entry_index)

Definition at line 1236 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_create ( u32  fib_index,
const fib_prefix_t prefix,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t paths 
)

Definition at line 672 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_create_special ( u32  fib_index,
const fib_prefix_t prefix,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 709 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_delete ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

fib_entry_delete

The source is withdrawing all the paths it provided

Definition at line 1085 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_entry_t* fib_entry_from_fib_node ( fib_node_t node)
static

Definition at line 307 of file fib_entry.c.

+ Here is the caller graph for this function:

fib_entry_t* fib_entry_get ( fib_node_index_t  index)

Definition at line 44 of file fib_entry.c.

adj_index_t fib_entry_get_adj ( fib_node_index_t  fib_entry_index)

Definition at line 525 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_source_t fib_entry_get_best_source ( fib_node_index_t  entry_index)

Definition at line 1364 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_entry_src_t* fib_entry_get_best_src_i ( const fib_entry_t fib_entry)
static

Definition at line 336 of file fib_entry.c.

+ Here is the caller graph for this function:

fib_forward_chain_type_t fib_entry_get_default_chain_type ( const fib_entry_t fib_entry)

Definition at line 109 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_get_fib_index ( fib_node_index_t  fib_entry_index)

Definition at line 1486 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_flag_t fib_entry_get_flags ( fib_node_index_t  fib_entry_index)

Definition at line 376 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_get_index ( const fib_entry_t fib_entry)

Definition at line 56 of file fib_entry.c.

+ Here is the caller graph for this function:

static fib_node_t* fib_entry_get_node ( fib_node_index_t  index)
static

Definition at line 50 of file fib_entry.c.

+ Here is the call graph for this function:

fib_node_index_t fib_entry_get_path_list ( fib_node_index_t  fib_entry_index)

Definition at line 540 of file fib_entry.c.

+ Here is the call graph for this function:

void fib_entry_get_prefix ( fib_node_index_t  fib_entry_index,
fib_prefix_t pfx 
)

Definition at line 1476 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_protocol_t fib_entry_get_proto ( const fib_entry_t fib_entry)
static

Definition at line 62 of file fib_entry.c.

+ Here is the caller graph for this function:

u32 fib_entry_get_resolving_interface ( fib_node_index_t  entry_index)

Definition at line 1354 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void fib_entry_last_lock_gone ( fib_node_t node)
static

Definition at line 316 of file fib_entry.c.

+ Here is the call graph for this function:

void fib_entry_lock ( fib_node_index_t  fib_entry_index)

Definition at line 1450 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_module_init ( void  )

Definition at line 1470 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_path_add ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t rpath 
)

Definition at line 841 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_path_remove ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
const fib_route_path_t rpath 
)

Definition at line 904 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_pool_size ( void  )

Definition at line 1496 of file fib_entry.c.

+ Here is the call graph for this function:

static void fib_entry_post_flag_update_actions ( fib_entry_t fib_entry,
fib_source_t  source,
fib_entry_flag_t  old_flags 
)
static

Definition at line 607 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void fib_entry_post_install_actions ( fib_entry_t fib_entry,
fib_source_t  source,
fib_entry_flag_t  old_flags 
)
static

Definition at line 663 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void fib_entry_post_update_actions ( fib_entry_t fib_entry,
fib_source_t  source,
fib_entry_flag_t  old_flags 
)
static

Definition at line 735 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_recursive_loop_detect ( fib_node_index_t  entry_index,
fib_node_index_t **  entry_indicies 
)

Definition at line 1302 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void fib_entry_show_memory ( void  )
static

Definition at line 425 of file fib_entry.c.

+ Here is the call graph for this function:

static void fib_entry_source_change ( fib_entry_t fib_entry,
fib_source_t  best_source,
fib_source_t  new_source,
fib_entry_flag_t  old_flags 
)
static

Definition at line 757 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_special_add ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 798 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_special_remove ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 999 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_special_update ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 819 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_entry_flag_t fib_entry_src_get_flags ( const fib_entry_src_t esrc)
static

Definition at line 366 of file fib_entry.c.

+ Here is the caller graph for this function:

static fib_source_t fib_entry_src_get_source ( const fib_entry_src_t esrc)
static

Definition at line 356 of file fib_entry.c.

+ Here is the caller graph for this function:

void fib_entry_unlock ( fib_node_index_t  fib_entry_index)

Definition at line 1460 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_update ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t paths 
)

fib_entry_update

The source has provided a new set of paths that will replace the old.

Definition at line 1097 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int fib_ip4_address_compare ( ip4_address_t a1,
ip4_address_t a2 
)
static

Definition at line 1376 of file fib_entry.c.

+ Here is the caller graph for this function:

static int fib_ip6_address_compare ( ip6_address_t a1,
ip6_address_t a2 
)
static

Definition at line 1390 of file fib_entry.c.

+ Here is the caller graph for this function:

u8* format_fib_entry ( u8 s,
va_list *  args 
)

Definition at line 134 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* show_fib_entry_command ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1502 of file fib_entry.c.

+ Here is the call graph for this function:

Variable Documentation

const char* fib_attribute_names[] = FIB_ENTRY_ATTRIBUTES
static

Definition at line 36 of file fib_entry.c.

fib_entry_t* fib_entry_pool
static

Definition at line 41 of file fib_entry.c.

const fib_node_vft_t fib_entry_vft
static
Initial value:
= {
.fnv_get = fib_entry_get_node,
.fnv_last_lock = fib_entry_last_lock_gone,
.fnv_back_walk = fib_entry_back_walk_notify,
.fnv_mem_show = fib_entry_show_memory,
}
static fib_node_back_walk_rc_t fib_entry_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: fib_entry.c:387
static fib_node_t * fib_entry_get_node(fib_node_index_t index)
Definition: fib_entry.c:50
static void fib_entry_last_lock_gone(fib_node_t *node)
Definition: fib_entry.c:316
static void fib_entry_show_memory(void)
Definition: fib_entry.c:425

Definition at line 455 of file fib_entry.c.

const char* fib_source_names[] = FIB_SOURCES
static

Definition at line 35 of file fib_entry.c.

vlib_cli_command_t show_fib_entry
static
Initial value:
= {
.path = "show fib entry",
.short_help = "show fib entry",
}
static clib_error_t * show_fib_entry_command(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: fib_entry.c:1502

(constructor) VLIB_CLI_COMMAND (show_fib_entry)

Definition at line 1543 of file fib_entry.c.