FD.io VPP  v21.01.1
Vector Packet Processing
fib_entry_track.h File Reference
+ Include dependency graph for fib_entry_track.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

fib_node_index_t fib_entry_track (u32 fib_index, const fib_prefix_t *prefix, fib_node_type_t child_type, index_t child_index, u32 *sibling)
 Trackers are used on FIB entries by objects that which to track the changing state of the entry. More...
 
void fib_entry_untrack (fib_node_index_t fei, u32 sibling)
 Stop tracking a FIB entry. More...
 
void fib_entry_track_module_init (void)
 

Function Documentation

◆ fib_entry_track()

fib_node_index_t fib_entry_track ( u32  fib_index,
const fib_prefix_t prefix,
fib_node_type_t  child_type,
index_t  child_index,
u32 sibling 
)

Trackers are used on FIB entries by objects that which to track the changing state of the entry.

For example a tunnel would track its destination address to be informed of reachability changes.

The benefit of this aproach is that each time a new client tracks the entry it doesn't RR source it. When an entry is sourced all its children are updated. Thus, new clients tracking an entry is O(n^2). With the tracker as indirection, the entry is sourced only once. Track a FIB entry

Parameters
fib_indexThe FIB the entry is in
prefixThe Prefix of the entry to track
child_typeThe type of object that is tracking this entry
child_indexThe pool index of the object tracking
sigbling[RETURNED] The sibling index of the child on the tracker
Returns
The index of the FIB entry

Definition at line 49 of file fib_entry_track.c.

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

◆ fib_entry_track_module_init()

void fib_entry_track_module_init ( void  )

Definition at line 175 of file fib_entry_track.c.

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

◆ fib_entry_untrack()

void fib_entry_untrack ( fib_node_index_t  fei,
u32  sibling 
)

Stop tracking a FIB entry.

Parameters
feiFIB entry index (as returned from the track API above)
siblingSibling index (as returned from the track API above)

Definition at line 79 of file fib_entry_track.c.

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