FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
fib_path_list.h File Reference
+ Include dependency graph for fib_path_list.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FIB_PATH_LIST_ATTRIBUTES
 
#define FOR_EACH_PATH_LIST_ATTRIBUTE(_item)
 
#define FIB_PATH_LIST_KEY_FLAGS   (FIB_PATH_LIST_FLAG_NO_URPF)
 The flags on a path-list that contribute to its key in the DB. More...
 

Typedefs

typedef enum fib_path_list_attribute_t_ fib_path_list_attribute_t
 Enumeration of path-list flags. More...
 
typedef enum fib_path_list_flags_t_ fib_path_list_flags_t
 
typedef enum fib_path_list_fwd_flags_t_ fib_path_list_fwd_flags_t
 Flags to control how the path-list returns forwarding information. More...
 
typedef fib_path_list_walk_rc_t(* fib_path_list_walk_fn_t) (fib_node_index_t pl_index, fib_node_index_t path_index, void *ctx)
 A callback function type for walking a path-list's paths. More...
 
typedef fib_path_list_walk_rc_t(* fib_path_list_walk_w_ext_fn_t) (fib_node_index_t pl_index, fib_node_index_t path_index, const struct fib_path_ext_t_ *ext_list, void *ctx)
 

Enumerations

enum  fib_path_list_attribute_t_ {
  FIB_PATH_LIST_ATTRIBUTE_FIRST = 0, FIB_PATH_LIST_ATTRIBUTE_SHARED = FIB_PATH_LIST_ATTRIBUTE_FIRST, FIB_PATH_LIST_ATTRIBUTE_DROP, FIB_PATH_LIST_ATTRIBUTE_LOCAL,
  FIB_PATH_LIST_ATTRIBUTE_EXCLUSIVE, FIB_PATH_LIST_ATTRIBUTE_RESOLVED, FIB_PATH_LIST_ATTRIBUTE_LOOPED, FIB_PATH_LIST_ATTRIBUTE_POPULAR,
  FIB_PATH_LIST_ATTRIBUTE_NO_URPF, FIB_PATH_LIST_ATTRIBUTE_LAST = FIB_PATH_LIST_ATTRIBUTE_NO_URPF
}
 Enumeration of path-list flags. More...
 
enum  fib_path_list_flags_t_ {
  FIB_PATH_LIST_FLAG_NONE = 0, FIB_PATH_LIST_FLAG_SHARED = (1 << FIB_PATH_LIST_ATTRIBUTE_SHARED), FIB_PATH_LIST_FLAG_DROP = (1 << FIB_PATH_LIST_ATTRIBUTE_DROP), FIB_PATH_LIST_FLAG_LOCAL = (1 << FIB_PATH_LIST_ATTRIBUTE_LOCAL),
  FIB_PATH_LIST_FLAG_EXCLUSIVE = (1 << FIB_PATH_LIST_ATTRIBUTE_EXCLUSIVE), FIB_PATH_LIST_FLAG_RESOLVED = (1 << FIB_PATH_LIST_ATTRIBUTE_RESOLVED), FIB_PATH_LIST_FLAG_LOOPED = (1 << FIB_PATH_LIST_ATTRIBUTE_LOOPED), FIB_PATH_LIST_FLAG_POPULAR = (1 << FIB_PATH_LIST_ATTRIBUTE_POPULAR),
  FIB_PATH_LIST_FLAG_NO_URPF = (1 << FIB_PATH_LIST_ATTRIBUTE_NO_URPF)
}
 
enum  fib_path_list_fwd_flags_t_ { FIB_PATH_LIST_FWD_FLAG_NONE = 0, FIB_PATH_LIST_FWD_FLAG_COLLAPSE = (1 << 0), FIB_PATH_LIST_FWD_FLAG_STICKY = (1 << 1) }
 Flags to control how the path-list returns forwarding information. More...
 

Functions

fib_node_index_t fib_path_list_create (fib_path_list_flags_t flags, const fib_route_path_t *paths)
 
fib_node_index_t fib_path_list_create_special (dpo_proto_t nh_proto, fib_path_list_flags_t flags, const dpo_id_t *dpo)
 
fib_node_index_t fib_path_list_copy_and_path_add (fib_node_index_t pl_index, fib_path_list_flags_t flags, const fib_route_path_t *path)
 
fib_node_index_t fib_path_list_copy_and_path_remove (fib_node_index_t pl_index, fib_path_list_flags_t flags, const fib_route_path_t *path)
 
fib_node_index_tfib_path_list_paths_add (fib_node_index_t path_list_index, const fib_route_path_t *rpaths)
 
fib_node_index_tfib_path_list_paths_remove (fib_node_index_t path_list_index, const fib_route_path_t *rpaths)
 
u32 fib_path_list_get_n_paths (fib_node_index_t pl_index)
 
void fib_path_list_contribute_forwarding (fib_node_index_t path_list_index, fib_forward_chain_type_t type, fib_path_list_fwd_flags_t flags, dpo_id_t *dpo)
 
void fib_path_list_contribute_urpf (fib_node_index_t path_index, index_t urpf)
 Contribute (add) this path list's uRPF list. More...
 
index_t fib_path_list_get_urpf (fib_node_index_t path_list_index)
 Return the the child the RPF list pre-built for this path list. More...
 
index_t fib_path_list_get_adj (fib_node_index_t path_list_index, fib_forward_chain_type_t type)
 
u32 fib_path_list_child_add (fib_node_index_t pl_index, fib_node_type_t type, fib_node_index_t child_index)
 
void fib_path_list_child_remove (fib_node_index_t pl_index, fib_node_index_t sibling_index)
 
void fib_path_list_back_walk (fib_node_index_t pl_index, fib_node_back_walk_ctx_t *ctx)
 
void fib_path_list_lock (fib_node_index_t pl_index)
 
void fib_path_list_unlock (fib_node_index_t pl_index)
 
int fib_path_list_recursive_loop_detect (fib_node_index_t path_list_index, fib_node_index_t **entry_indicies)
 
u32 fib_path_list_get_resolving_interface (fib_node_index_t path_list_index)
 
int fib_path_list_is_looped (fib_node_index_t path_list_index)
 
int fib_path_list_is_popular (fib_node_index_t path_list_index)
 
dpo_proto_t fib_path_list_get_proto (fib_node_index_t path_list_index)
 
u8fib_path_list_format (fib_node_index_t pl_index, u8 *s)
 
u8format_fib_path_list (u8 *s, va_list *args)
 
index_t fib_path_list_lb_map_add_or_lock (fib_node_index_t pl_index, const fib_node_index_t *pis)
 
u32 fib_path_list_find_rpath (fib_node_index_t path_list_index, const fib_route_path_t *rpath)
 
void fib_path_list_walk (fib_node_index_t pl_index, fib_path_list_walk_fn_t func, void *ctx)
 
void fib_path_list_walk_w_ext (fib_node_index_t pl_index, const fib_path_ext_list_t *ext_list, fib_path_list_walk_w_ext_fn_t func, void *ctx)
 
void fib_path_list_module_init (void)
 
u32 fib_path_list_pool_size (void)
 
u32 fib_path_list_db_size (void)
 

Macro Definition Documentation

◆ FIB_PATH_LIST_ATTRIBUTES

#define FIB_PATH_LIST_ATTRIBUTES
Value:

Definition at line 91 of file fib_path_list.h.

◆ FIB_PATH_LIST_KEY_FLAGS

#define FIB_PATH_LIST_KEY_FLAGS   (FIB_PATH_LIST_FLAG_NO_URPF)

The flags on a path-list that contribute to its key in the DB.

So path-lists with these flags different are not conisdered the same.

Definition at line 112 of file fib_path_list.h.

◆ FOR_EACH_PATH_LIST_ATTRIBUTE

#define FOR_EACH_PATH_LIST_ATTRIBUTE (   _item)
Value:
_item++)

Definition at line 102 of file fib_path_list.h.

Typedef Documentation

◆ fib_path_list_attribute_t

Enumeration of path-list flags.

◆ fib_path_list_flags_t

◆ fib_path_list_fwd_flags_t

Flags to control how the path-list returns forwarding information.

◆ fib_path_list_walk_fn_t

typedef fib_path_list_walk_rc_t(* fib_path_list_walk_fn_t) (fib_node_index_t pl_index, fib_node_index_t path_index, void *ctx)

A callback function type for walking a path-list's paths.

Definition at line 184 of file fib_path_list.h.

◆ fib_path_list_walk_w_ext_fn_t

typedef fib_path_list_walk_rc_t(* fib_path_list_walk_w_ext_fn_t) (fib_node_index_t pl_index, fib_node_index_t path_index, const struct fib_path_ext_t_ *ext_list, void *ctx)

Definition at line 193 of file fib_path_list.h.

Enumeration Type Documentation

◆ fib_path_list_attribute_t_

Enumeration of path-list flags.

Enumerator
FIB_PATH_LIST_ATTRIBUTE_FIRST 

Marker.

Add new flags after this one.

FIB_PATH_LIST_ATTRIBUTE_SHARED 

This path list is shareable.

Shareable path-lists are inserted into the path-list data-base. All path-list are inherently shareable, the reason we share some and not others is to limit the size of the path-list database. This DB must be searched for each route update.

FIB_PATH_LIST_ATTRIBUTE_DROP 

explicit drop path-list.

Used when the entry source needs to force a drop, despite the fact the path info is present.

FIB_PATH_LIST_ATTRIBUTE_LOCAL 

explicit local path-list.

FIB_PATH_LIST_ATTRIBUTE_EXCLUSIVE 

exclusive path-list.

Exclusive means the path will resolve via the exclusive (user provided) adj.

FIB_PATH_LIST_ATTRIBUTE_RESOLVED 

resolved path-list

FIB_PATH_LIST_ATTRIBUTE_LOOPED 

looped path-list.

one path looped implies the whole list is

FIB_PATH_LIST_ATTRIBUTE_POPULAR 

a popular path-ist is one that is shared amongst many entries.

Path list become popular as they gain more children, but they don't become unpopular as they lose them.

FIB_PATH_LIST_ATTRIBUTE_NO_URPF 

no uRPF - do not generate unicast RPF list for this path-list

FIB_PATH_LIST_ATTRIBUTE_LAST 

Marher.

Add new flags before this one, and then update it.

Definition at line 28 of file fib_path_list.h.

◆ fib_path_list_flags_t_

Enumerator
FIB_PATH_LIST_FLAG_NONE 
FIB_PATH_LIST_FLAG_SHARED 
FIB_PATH_LIST_FLAG_DROP 
FIB_PATH_LIST_FLAG_LOCAL 
FIB_PATH_LIST_FLAG_EXCLUSIVE 
FIB_PATH_LIST_FLAG_RESOLVED 
FIB_PATH_LIST_FLAG_LOOPED 
FIB_PATH_LIST_FLAG_POPULAR 
FIB_PATH_LIST_FLAG_NO_URPF 

Definition at line 79 of file fib_path_list.h.

◆ fib_path_list_fwd_flags_t_

Flags to control how the path-list returns forwarding information.

Enumerator
FIB_PATH_LIST_FWD_FLAG_NONE 
FIB_PATH_LIST_FWD_FLAG_COLLAPSE 
FIB_PATH_LIST_FWD_FLAG_STICKY 

Definition at line 140 of file fib_path_list.h.

Function Documentation

◆ fib_path_list_back_walk()

void fib_path_list_back_walk ( fib_node_index_t  pl_index,
fib_node_back_walk_ctx_t ctx 
)

Definition at line 465 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_child_add()

u32 fib_path_list_child_add ( fib_node_index_t  pl_index,
fib_node_type_t  type,
fib_node_index_t  child_index 
)

Definition at line 1296 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_child_remove()

void fib_path_list_child_remove ( fib_node_index_t  pl_index,
fib_node_index_t  sibling_index 
)

Definition at line 1335 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_contribute_forwarding()

void fib_path_list_contribute_forwarding ( fib_node_index_t  path_list_index,
fib_forward_chain_type_t  type,
fib_path_list_fwd_flags_t  flags,
dpo_id_t dpo 
)

Definition at line 1211 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_contribute_urpf()

void fib_path_list_contribute_urpf ( fib_node_index_t  path_list_index,
index_t  urpf 
)

Contribute (add) this path list's uRPF list.

This allows the child to construct an aggregate list.

Definition at line 435 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_copy_and_path_add()

fib_node_index_t fib_path_list_copy_and_path_add ( fib_node_index_t  pl_index,
fib_path_list_flags_t  flags,
const fib_route_path_t path 
)

Definition at line 907 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_copy_and_path_remove()

fib_node_index_t fib_path_list_copy_and_path_remove ( fib_node_index_t  pl_index,
fib_path_list_flags_t  flags,
const fib_route_path_t path 
)

Definition at line 1086 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_create()

fib_node_index_t fib_path_list_create ( fib_path_list_flags_t  flags,
const fib_route_path_t paths 
)

Definition at line 682 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_create_special()

fib_node_index_t fib_path_list_create_special ( dpo_proto_t  nh_proto,
fib_path_list_flags_t  flags,
const dpo_id_t dpo 
)

Definition at line 774 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_db_size()

u32 fib_path_list_db_size ( void  )

Definition at line 1376 of file fib_path_list.c.

+ Here is the call graph for this function:

◆ fib_path_list_find_rpath()

u32 fib_path_list_find_rpath ( fib_node_index_t  path_list_index,
const fib_route_path_t rpath 
)

Definition at line 804 of file fib_path_list.c.

+ Here is the call graph for this function:

◆ fib_path_list_format()

u8* fib_path_list_format ( fib_node_index_t  pl_index,
u8 s 
)

Definition at line 165 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_get_adj()

index_t fib_path_list_get_adj ( fib_node_index_t  path_list_index,
fib_forward_chain_type_t  type 
)

Definition at line 1242 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_get_n_paths()

u32 fib_path_list_get_n_paths ( fib_node_index_t  pl_index)

Definition at line 595 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_get_proto()

dpo_proto_t fib_path_list_get_proto ( fib_node_index_t  path_list_index)

Definition at line 633 of file fib_path_list.c.

+ Here is the call graph for this function:

◆ fib_path_list_get_resolving_interface()

u32 fib_path_list_get_resolving_interface ( fib_node_index_t  path_list_index)

Definition at line 611 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_get_urpf()

index_t fib_path_list_get_urpf ( fib_node_index_t  path_list_index)

Return the the child the RPF list pre-built for this path list.

Definition at line 449 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_is_looped()

int fib_path_list_is_looped ( fib_node_index_t  path_list_index)

Definition at line 647 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_is_popular()

int fib_path_list_is_popular ( fib_node_index_t  path_list_index)

Definition at line 657 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_lb_map_add_or_lock()

index_t fib_path_list_lb_map_add_or_lock ( fib_node_index_t  pl_index,
const fib_node_index_t pis 
)

◆ fib_path_list_lock()

void fib_path_list_lock ( fib_node_index_t  pl_index)

Definition at line 1344 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_module_init()

void fib_path_list_module_init ( void  )

Definition at line 1425 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_paths_add()

fib_node_index_t* fib_path_list_paths_add ( fib_node_index_t  path_list_index,
const fib_route_path_t rpaths 
)

Definition at line 831 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_paths_remove()

fib_node_index_t* fib_path_list_paths_remove ( fib_node_index_t  path_list_index,
const fib_route_path_t rpaths 
)

Definition at line 1025 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_pool_size()

u32 fib_path_list_pool_size ( void  )

Definition at line 1370 of file fib_path_list.c.

+ Here is the call graph for this function:

◆ fib_path_list_recursive_loop_detect()

int fib_path_list_recursive_loop_detect ( fib_node_index_t  path_list_index,
fib_node_index_t **  entry_indicies 
)

Definition at line 1252 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_unlock()

void fib_path_list_unlock ( fib_node_index_t  pl_index)

Definition at line 1357 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_walk()

void fib_path_list_walk ( fib_node_index_t  pl_index,
fib_path_list_walk_fn_t  func,
void *  ctx 
)

Definition at line 1382 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fib_path_list_walk_w_ext()

void fib_path_list_walk_w_ext ( fib_node_index_t  pl_index,
const fib_path_ext_list_t ext_list,
fib_path_list_walk_w_ext_fn_t  func,
void *  ctx 
)

Definition at line 1401 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_fib_path_list()

u8* format_fib_path_list ( u8 s,
va_list *  args 
)

Definition at line 125 of file fib_path_list.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
FIB_PATH_LIST_ATTRIBUTE_LAST
@ FIB_PATH_LIST_ATTRIBUTE_LAST
Marher.
Definition: fib_path_list.h:76
FIB_PATH_LIST_ATTRIBUTE_RESOLVED
@ FIB_PATH_LIST_ATTRIBUTE_RESOLVED
resolved path-list
Definition: fib_path_list.h:58
FIB_PATH_LIST_ATTRIBUTE_EXCLUSIVE
@ FIB_PATH_LIST_ATTRIBUTE_EXCLUSIVE
exclusive path-list.
Definition: fib_path_list.h:54
FIB_PATH_LIST_ATTRIBUTE_SHARED
@ FIB_PATH_LIST_ATTRIBUTE_SHARED
This path list is shareable.
Definition: fib_path_list.h:40
FIB_PATH_LIST_ATTRIBUTE_NO_URPF
@ FIB_PATH_LIST_ATTRIBUTE_NO_URPF
no uRPF - do not generate unicast RPF list for this path-list
Definition: fib_path_list.h:72
FIB_PATH_LIST_ATTRIBUTE_POPULAR
@ FIB_PATH_LIST_ATTRIBUTE_POPULAR
a popular path-ist is one that is shared amongst many entries.
Definition: fib_path_list.h:68
FIB_PATH_LIST_ATTRIBUTE_DROP
@ FIB_PATH_LIST_ATTRIBUTE_DROP
explicit drop path-list.
Definition: fib_path_list.h:45
FIB_PATH_LIST_ATTRIBUTE_FIRST
@ FIB_PATH_LIST_ATTRIBUTE_FIRST
Marker.
Definition: fib_path_list.h:32
FIB_PATH_LIST_ATTRIBUTE_LOOPED
@ FIB_PATH_LIST_ATTRIBUTE_LOOPED
looped path-list.
Definition: fib_path_list.h:62
FIB_PATH_LIST_ATTRIBUTE_LOCAL
@ FIB_PATH_LIST_ATTRIBUTE_LOCAL
explicit local path-list.
Definition: fib_path_list.h:49