FD.io VPP
v20.05.1-6-gf53edbc3b
Vector Packet Processing
|
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) |
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
fib_index | The FIB the entry is in |
prefix | The Prefix of the entry to track |
child_type | The type of object that is tracking this entry |
child_index | The pool index of the object tracking |
sigbling | [RETURNED] The sibling index of the child on the tracker |
Definition at line 49 of file fib_entry_track.c.
void fib_entry_track_module_init | ( | void | ) |
Definition at line 175 of file fib_entry_track.c.
void fib_entry_untrack | ( | fib_node_index_t | fei, |
u32 | sibling | ||
) |
Stop tracking a FIB entry.
fei | FIB entry index (as returned from the track API above) |
sibling | Sibling index (as returned from the track API above) |
Definition at line 79 of file fib_entry_track.c.