FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
fib_urpf_list.h File Reference
+ Include dependency graph for fib_urpf_list.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fib_urpf_list_t_
 

Typedefs

typedef enum fib_urpf_list_flag_t_ fib_urpf_list_flag_t
 A unicast RPF list. More...
 
typedef struct fib_urpf_list_t_ fib_urpf_list_t
 

Enumerations

enum  fib_urpf_list_flag_t_ { FIB_URPF_LIST_BAKED = (1 << 0) }
 A unicast RPF list. More...
 

Functions

index_t fib_urpf_list_alloc_and_lock (void)
 
void fib_urpf_list_unlock (index_t urpf)
 
void fib_urpf_list_lock (index_t urpf)
 
void fib_urpf_list_append (index_t urpf, adj_index_t adj)
 Append another interface to the list. More...
 
void fib_urpf_list_combine (index_t urpf1, index_t urpf2)
 Combine to interface lists. More...
 
void fib_urpf_list_bake (index_t urpf)
 Convert the uRPF list from the itf set obtained during the walk to a unique list. More...
 
u8format_fib_urpf_list (u8 *s, va_list *ap)
 
void fib_urpf_list_show_mem (void)
 
static fib_urpf_list_tfib_urpf_list_get (index_t index)
 
static int fib_urpf_check (index_t ui, u32 sw_if_index)
 Data-Plane function to check an input interface against an uRPF list. More...
 
static int fib_urpf_check_size (index_t ui)
 Data-Plane function to check the size of an uRPF list, (i.e. More...
 

Variables

fib_urpf_list_tfib_urpf_list_pool
 pool of all fib_urpf_list More...
 

Typedef Documentation

A unicast RPF list.

The uRPF list is the set of interfaces that a prefix can be reached through. There are 3 levels of RPF check:

  • do we have any route to the source (i.e. it's not drop)
  • did the packet arrive on an interface that the source is reachable through
  • did the packet arrive from a peer that the source is reachable through we don't support the last. But it could be done by storing adjs in the uPRF list rather than interface indices.

these conditions are checked against the list by:

  • the list is not empty
  • there is an interface in the list that is on the input interface.
  • there is an adj in the list whose MAC address matches the packet's source MAC and input interface.

To speed the last two checks the interface list only needs to have the unique interfaces present. If the uRPF check was instead implemented by forward walking the DPO chain, then that walk would encounter a great deal of non-adjacency objects (i.e. load-balances, mpls-labels, etc) and potentially the same adjacency many times (esp. when UCMP is used). To that end the uRPF list is a collapsed, unique interface only list. flags

Enumeration Type Documentation

A unicast RPF list.

The uRPF list is the set of interfaces that a prefix can be reached through. There are 3 levels of RPF check:

  • do we have any route to the source (i.e. it's not drop)
  • did the packet arrive on an interface that the source is reachable through
  • did the packet arrive from a peer that the source is reachable through we don't support the last. But it could be done by storing adjs in the uPRF list rather than interface indices.

these conditions are checked against the list by:

  • the list is not empty
  • there is an interface in the list that is on the input interface.
  • there is an adj in the list whose MAC address matches the packet's source MAC and input interface.

To speed the last two checks the interface list only needs to have the unique interfaces present. If the uRPF check was instead implemented by forward walking the DPO chain, then that walk would encounter a great deal of non-adjacency objects (i.e. load-balances, mpls-labels, etc) and potentially the same adjacency many times (esp. when UCMP is used). To that end the uRPF list is a collapsed, unique interface only list. flags

Enumerator
FIB_URPF_LIST_BAKED 

Set to indicated that the uRPF list has already been baked.

This is protection against it being baked more than once. These are not chunky fries - once is enough.

Definition at line 48 of file fib_urpf_list.h.

Function Documentation

static int fib_urpf_check ( index_t  ui,
u32  sw_if_index 
)
inlinestatic

Data-Plane function to check an input interface against an uRPF list.

Parameters
uiThe uRPF list index to check against. Get this from the load-balance object that is the result of the FIB lookup
sw_if_indexThe SW interface index to validate
Returns
1 if the interface is found, 0 otherwise

Definition at line 111 of file fib_urpf_list.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int fib_urpf_check_size ( index_t  ui)
inlinestatic

Data-Plane function to check the size of an uRPF list, (i.e.

the number of interfaces in the list).

Parameters
uiThe uRPF list index to check against. Get this from the load-balance object that is the result of the FIB lookup
Returns
the number of interfaces in the list

Definition at line 137 of file fib_urpf_list.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

index_t fib_urpf_list_alloc_and_lock ( void  )

Definition at line 55 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_urpf_list_append ( index_t  urpf,
adj_index_t  adj 
)

Append another interface to the list.

Definition at line 100 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_urpf_list_bake ( index_t  urpf)

Convert the uRPF list from the itf set obtained during the walk to a unique list.

Definition at line 145 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_urpf_list_combine ( index_t  urpf1,
index_t  urpf2 
)

Combine to interface lists.

Definition at line 114 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_urpf_list_t* fib_urpf_list_get ( index_t  index)
inlinestatic

Definition at line 96 of file fib_urpf_list.h.

+ Here is the caller graph for this function:

void fib_urpf_list_lock ( index_t  urpf)

Definition at line 87 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_urpf_list_show_mem ( void  )

Definition at line 202 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_urpf_list_unlock ( index_t  urpf)

Definition at line 68 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_fib_urpf_list ( u8 s,
va_list *  ap 
)

Definition at line 25 of file fib_urpf_list.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

fib_urpf_list_t* fib_urpf_list_pool

pool of all fib_urpf_list

Definition at line 22 of file fib_urpf_list.c.