FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
fib_entry_delegate.h File Reference
+ Include dependency graph for fib_entry_delegate.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fib_entry_delegate_track_t_
 State for FIB entry tracking. More...
 
struct  fib_entry_delegate_t_
 A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functionality through the composition of, and delgation to, other objects. More...
 

Macros

#define FOR_EACH_DELEGATE_CHAIN(_entry, _fdt, _fed, _body)
 

Typedefs

typedef enum fib_entry_delegate_type_t_ fib_entry_delegate_type_t
 Delegate types. More...
 
typedef enum fib_bfd_state_t_ fib_bfd_state_t
 Distillation of the BFD session states into a go/no-go for using the associated tracked FIB entry. More...
 
typedef struct fib_entry_delegate_track_t_ fib_entry_delegate_track_t
 State for FIB entry tracking. More...
 
typedef struct fib_entry_delegate_t_ fib_entry_delegate_t
 A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functionality through the composition of, and delgation to, other objects. More...
 

Enumerations

enum  fib_entry_delegate_type_t_ {
  FIB_ENTRY_DELEGATE_CHAIN_UNICAST_IP4 = FIB_FORW_CHAIN_TYPE_UNICAST_IP4, FIB_ENTRY_DELEGATE_CHAIN_UNICAST_IP6 = FIB_FORW_CHAIN_TYPE_UNICAST_IP6, FIB_ENTRY_DELEGATE_CHAIN_MPLS_EOS = FIB_FORW_CHAIN_TYPE_MPLS_EOS, FIB_ENTRY_DELEGATE_CHAIN_MPLS_NON_EOS = FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS,
  FIB_ENTRY_DELEGATE_CHAIN_ETHERNET = FIB_FORW_CHAIN_TYPE_ETHERNET, FIB_ENTRY_DELEGATE_CHAIN_NSH = FIB_FORW_CHAIN_TYPE_NSH, FIB_ENTRY_DELEGATE_COVERED, FIB_ENTRY_DELEGATE_BFD,
  FIB_ENTRY_DELEGATE_TRACK, FIB_ENTRY_DELEGATE_ATTACHED_IMPORT, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT
}
 Delegate types. More...
 
enum  fib_bfd_state_t_ { FIB_BFD_STATE_UP, FIB_BFD_STATE_DOWN }
 Distillation of the BFD session states into a go/no-go for using the associated tracked FIB entry. More...
 

Functions

void fib_entry_delegate_remove (fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
 
fib_entry_delegate_tfib_entry_delegate_find_or_add (fib_entry_t *fib_entry, fib_entry_delegate_type_t fdt)
 
fib_entry_delegate_tfib_entry_delegate_find (const fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
 
fib_forward_chain_type_t fib_entry_delegate_type_to_chain_type (fib_entry_delegate_type_t type)
 
fib_entry_delegate_type_t fib_entry_chain_type_to_delegate_type (fib_forward_chain_type_t type)
 
u8format_fib_entry_delegate (u8 *s, va_list *args)
 
fib_node_index_t fib_entry_delegate_get_index (const fib_entry_delegate_t *fed)
 
fib_entry_delegate_tfib_entry_delegate_get (fib_node_index_t fedi)
 

Macro Definition Documentation

◆ FOR_EACH_DELEGATE_CHAIN

#define FOR_EACH_DELEGATE_CHAIN (   _entry,
  _fdt,
  _fed,
  _body 
)
Value:
{ \
_fdt++) \
{ \
_fed = fib_entry_delegate_find(_entry, _fdt); \
if (NULL != _fed) { \
_body; \
} \
} \
}
#define NULL
Definition: clib.h:58
fib_entry_delegate_t * fib_entry_delegate_find(const fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
Forwarding chain types: for the vast majority of FIB entries only one chain is required - the one tha...

Definition at line 61 of file fib_entry_delegate.h.

Typedef Documentation

◆ fib_bfd_state_t

Distillation of the BFD session states into a go/no-go for using the associated tracked FIB entry.

◆ fib_entry_delegate_t

A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functionality through the composition of, and delgation to, other objects.

These 'other' objects are delegates. Delagates are thus attached to other FIB objects to extend their functionality.

◆ fib_entry_delegate_track_t

State for FIB entry tracking.

◆ fib_entry_delegate_type_t

Enumeration Type Documentation

◆ fib_bfd_state_t_

Distillation of the BFD session states into a go/no-go for using the associated tracked FIB entry.

Enumerator
FIB_BFD_STATE_UP 
FIB_BFD_STATE_DOWN 

Definition at line 78 of file fib_entry_delegate.h.

◆ fib_entry_delegate_type_t_

Delegate types.

Enumerator
FIB_ENTRY_DELEGATE_CHAIN_UNICAST_IP4 

Forwarding chain types: for the vast majority of FIB entries only one chain is required - the one that forwards traffic matching the fib_entry_t's fib_prefix_t.

For those fib_entry_t that are a resolution target for other fib_entry_t's they will also need the chain to provide forwarding for those children. We store these additional chains in delegates to save memory in the common case.

FIB_ENTRY_DELEGATE_CHAIN_UNICAST_IP6 
FIB_ENTRY_DELEGATE_CHAIN_MPLS_EOS 
FIB_ENTRY_DELEGATE_CHAIN_MPLS_NON_EOS 
FIB_ENTRY_DELEGATE_CHAIN_ETHERNET 
FIB_ENTRY_DELEGATE_CHAIN_NSH 
FIB_ENTRY_DELEGATE_COVERED 

Dependency list of covered entries.

these are more specific entries that are interested in changes to their respective cover

FIB_ENTRY_DELEGATE_BFD 

BFD session state.

FIB_ENTRY_DELEGATE_TRACK 

Tracker.

FIB_ENTRY_DELEGATE_ATTACHED_IMPORT 

Attached import/export functionality.

FIB_ENTRY_DELEGATE_ATTACHED_EXPORT 

Definition at line 25 of file fib_entry_delegate.h.

Function Documentation

◆ fib_entry_chain_type_to_delegate_type()

fib_entry_delegate_type_t fib_entry_chain_type_to_delegate_type ( fib_forward_chain_type_t  type)

Definition at line 134 of file fib_entry_delegate.c.

+ Here is the caller graph for this function:

◆ fib_entry_delegate_find()

fib_entry_delegate_t* fib_entry_delegate_find ( const fib_entry_t fib_entry,
fib_entry_delegate_type_t  type 
)

Definition at line 65 of file fib_entry_delegate.c.

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

◆ fib_entry_delegate_find_or_add()

fib_entry_delegate_t* fib_entry_delegate_find_or_add ( fib_entry_t fib_entry,
fib_entry_delegate_type_t  fdt 
)

Definition at line 118 of file fib_entry_delegate.c.

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

◆ fib_entry_delegate_get()

fib_entry_delegate_t* fib_entry_delegate_get ( fib_node_index_t  fedi)

Definition at line 23 of file fib_entry_delegate.c.

+ Here is the caller graph for this function:

◆ fib_entry_delegate_get_index()

fib_node_index_t fib_entry_delegate_get_index ( const fib_entry_delegate_t fed)

Definition at line 29 of file fib_entry_delegate.c.

+ Here is the caller graph for this function:

◆ fib_entry_delegate_remove()

void fib_entry_delegate_remove ( fib_entry_t fib_entry,
fib_entry_delegate_type_t  type 
)

Definition at line 72 of file fib_entry_delegate.c.

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

◆ fib_entry_delegate_type_to_chain_type()

fib_forward_chain_type_t fib_entry_delegate_type_to_chain_type ( fib_entry_delegate_type_t  type)

Definition at line 160 of file fib_entry_delegate.c.

+ Here is the caller graph for this function:

◆ format_fib_entry_delegate()

u8* format_fib_entry_delegate ( u8 s,
va_list *  args 
)

Definition at line 296 of file fib_entry_delegate.c.

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