FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adj_midchain.h File Reference
+ Include dependency graph for adj_midchain.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void adj_nbr_midchain_update_rewrite (adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *fixup_data, adj_flags_t flags, u8 *rewrite)
 Midchain Adjacency sub-type. More...
 
void adj_nbr_midchain_reset_next_node (adj_index_t adj_index)
 Return the adjacency's next node to its default value. More...
 
void adj_nbr_midchain_update_next_node (adj_index_t adj_index, u32 node_index)
 Update the VLIB node to which packets are sent post processing. More...
 
void adj_nbr_midchain_stack (adj_index_t adj_index, const dpo_id_t *dpo)
 [re]stack a midchain. More...
 
void adj_nbr_midchain_stack_on_fib_entry (adj_index_t adj_index, fib_node_index_t fei, fib_forward_chain_type_t fct)
 [re]stack a midchain. More...
 
void adj_nbr_midchain_unstack (adj_index_t adj_index)
 unstack a midchain. More...
 
int adj_ndr_midchain_recursive_loop_detect (adj_index_t ai, fib_node_index_t **entry_indicies)
 descend the FIB graph looking for loops More...
 
void adj_midchain_module_init (void)
 Module initialisation. More...
 
u8format_adj_midchain (u8 *s, va_list *ap)
 Format a midchain adjacency. More...
 
void adj_midchain_delegate_stack (adj_index_t ai, u32 fib_index, const fib_prefix_t *pfx)
 create/attach a midchain delegate and stack it on the prefix passed More...
 
void adj_midchain_delegate_restack (adj_index_t ai)
 restack a midchain delegate More...
 
void adj_midchain_delegate_unstack (adj_index_t ai)
 unstack a midchain delegate (this stacks it on a drop) More...
 
u8 adj_is_midchain (adj_index_t ai)
 

Function Documentation

◆ adj_is_midchain()

u8 adj_is_midchain ( adj_index_t  ai)

Definition at line 29 of file adj_midchain.c.

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

◆ adj_midchain_delegate_restack()

void adj_midchain_delegate_restack ( adj_index_t  ai)

restack a midchain delegate

Definition at line 76 of file adj_midchain_delegate.c.

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

◆ adj_midchain_delegate_stack()

void adj_midchain_delegate_stack ( adj_index_t  ai,
u32  fib_index,
const fib_prefix_t pfx 
)

create/attach a midchain delegate and stack it on the prefix passed

Parameters
ai- the index of the adjacency to stack
fib_index- The FIB index of the prefix on which to stack
pfx- The prefix on which to stack

Definition at line 101 of file adj_midchain_delegate.c.

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

◆ adj_midchain_delegate_unstack()

void adj_midchain_delegate_unstack ( adj_index_t  ai)

unstack a midchain delegate (this stacks it on a drop)

Definition at line 135 of file adj_midchain_delegate.c.

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

◆ adj_midchain_module_init()

void adj_midchain_module_init ( void  )

Module initialisation.

Definition at line 566 of file adj_midchain.c.

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

◆ adj_nbr_midchain_reset_next_node()

void adj_nbr_midchain_reset_next_node ( adj_index_t  adj_index)

Return the adjacency's next node to its default value.

Parameters
adj_indexThe index of the neighbour adjacency.

Definition at line 272 of file adj_midchain.c.

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

◆ adj_nbr_midchain_stack()

void adj_nbr_midchain_stack ( adj_index_t  adj_index,
const dpo_id_t next 
)

[re]stack a midchain.

'Stacking' is the act of forming parent-child relationships in the data-plane graph. Do NOT use this function to stack on a DPO type that might form a loop.

Parameters
adj_indexThe index of the midchain to stack
dpoThe parent DPO to stack onto (i.e. become a child of).

[re]stack a midchain.

Definition at line 429 of file adj_midchain.c.

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

◆ adj_nbr_midchain_stack_on_fib_entry()

void adj_nbr_midchain_stack_on_fib_entry ( adj_index_t  adj_index,
fib_node_index_t  fei,
fib_forward_chain_type_t  fct 
)

[re]stack a midchain.

'Stacking' is the act of forming parent-child relationships in the data-plane graph. Since function performs recursive loop detection.

Parameters
adj_indexThe index of the midchain to stack
feiThe FIB entry to stack on
fctThe chain type to use from the fib entry fowarding

Definition at line 335 of file adj_midchain.c.

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

◆ adj_nbr_midchain_unstack()

void adj_nbr_midchain_unstack ( adj_index_t  adj_index)

unstack a midchain.

This will break the chain between the midchain and the next graph section. This is a implemented as stack-on-drop

Parameters
adj_indexThe index of the midchain to stack

unstack a midchain.

Unstack the adj. stack it on drop

Definition at line 303 of file adj_midchain.c.

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

◆ adj_nbr_midchain_update_next_node()

void adj_nbr_midchain_update_next_node ( adj_index_t  adj_index,
u32  node_index 
)

Update the VLIB node to which packets are sent post processing.

Parameters
adj_indexThe index of the neighbour adjacency.
nodenode-index to send to

Definition at line 246 of file adj_midchain.c.

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

◆ adj_nbr_midchain_update_rewrite()

void adj_nbr_midchain_update_rewrite ( adj_index_t  adj_index,
adj_midchain_fixup_t  fixup,
const void *  fixup_data,
adj_flags_t  flags,
u8 rewrite 
)

Midchain Adjacency sub-type.

These adjs represent an L3 peer on a tunnel interface. The tunnel's adjacency is thus not the end of the chain, and needs to stack on/link to another chain (or portion of the graph) to reach the tunnel's destination.

Convert an existing neighbour adjacency into a midchain

Parameters
adj_indexThe index of the neighbour adjacency.
fixupThe function that will be invoked at paket switch time to 'fixup' the rewrite applied with necessary per-packet info (i.e. length, checksums).
fixup_dataContext data set by the caller that is provided as an argument in the fixup function.
flagsFlags controlling the adjacency behaviour
rewriteThe rewrite.

Midchain Adjacency sub-type.

Update the adjacency's rewrite string. A NULL string implies the rewrite is reset (i.e. when ARP/ND entry is gone). NB: the adj being updated may be handling traffic in the DP.

Definition at line 213 of file adj_midchain.c.

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

◆ adj_ndr_midchain_recursive_loop_detect()

int adj_ndr_midchain_recursive_loop_detect ( adj_index_t  ai,
fib_node_index_t **  entry_indicies 
)

descend the FIB graph looking for loops

Parameters
aiThe adj index to traverse
entry_indicies)A pointer to a vector of FIB entries already visited.

Definition at line 447 of file adj_midchain.c.

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

◆ format_adj_midchain()

u8* format_adj_midchain ( u8 s,
va_list *  ap 
)

Format a midchain adjacency.

Definition at line 474 of file adj_midchain.c.

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