FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
adj_midchain.c File Reference
+ Include dependency graph for adj_midchain.c:

Go to the source code of this file.

Functions

u8 adj_is_midchain (adj_index_t ai)
 
static u32 adj_get_midchain_node (vnet_link_t link)
 
static u8 adj_midchain_get_feature_arc_index_for_link_type (const ip_adjacency_t *adj)
 
static u32 adj_nbr_midchain_get_tx_node (ip_adjacency_t *adj)
 
void adj_midchain_teardown (ip_adjacency_t *adj)
 adj_midchain_setup More...
 
void adj_midchain_setup (adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *data, adj_flags_t flags)
 adj_midchain_setup More...
 
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)
 adj_nbr_midchain_update_rewrite More...
 
void adj_nbr_midchain_update_next_node (adj_index_t adj_index, u32 next_node)
 Update the VLIB node to which packets are sent post processing. 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_unstack (adj_index_t adj_index)
 adj_nbr_midchain_unstack More...
 
void adj_nbr_midchain_stack_on_fib_entry (adj_index_t ai, fib_node_index_t fei, fib_forward_chain_type_t fct)
 [re]stack a midchain. More...
 
void adj_nbr_midchain_stack (adj_index_t adj_index, const dpo_id_t *next)
 adj_nbr_midchain_stack 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...
 
u8format_adj_midchain (u8 *s, va_list *ap)
 Format a midchain adjacency. More...
 
static void adj_dpo_lock (dpo_id_t *dpo)
 
static void adj_dpo_unlock (dpo_id_t *dpo)
 
void adj_midchain_module_init (void)
 Module initialisation. More...
 

Variables

const static dpo_vft_t adj_midchain_dpo_vft
 
const static char *const midchain_ip4_nodes []
 The per-protocol VLIB graph nodes that are assigned to a midchain object. More...
 
const static char *const midchain_ip6_nodes []
 
const static char *const midchain_mpls_nodes []
 
const static char *const midchain_ethernet_nodes []
 
const static char *const midchain_nsh_nodes []
 
const static char *const *const midchain_nodes [DPO_PROTO_NUM]
 

Function Documentation

◆ adj_dpo_lock()

static void adj_dpo_lock ( dpo_id_t dpo)
static

Definition at line 505 of file adj_midchain.c.

+ Here is the call graph for this function:

◆ adj_dpo_unlock()

static void adj_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 510 of file adj_midchain.c.

+ Here is the call graph for this function:

◆ adj_get_midchain_node()

static u32 adj_get_midchain_node ( vnet_link_t  link)
inlinestatic

Definition at line 57 of file adj_midchain.c.

+ Here is the caller graph for this function:

◆ 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_get_feature_arc_index_for_link_type()

static u8 adj_midchain_get_feature_arc_index_for_link_type ( const ip_adjacency_t adj)
static

Definition at line 78 of file adj_midchain.c.

+ 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_midchain_setup()

void adj_midchain_setup ( adj_index_t  adj_index,
adj_midchain_fixup_t  fixup,
const void *  data,
adj_flags_t  flags 
)

adj_midchain_setup

Setup the adj as a mid-chain

Definition at line 153 of file adj_midchain.c.

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

◆ adj_midchain_teardown()

void adj_midchain_teardown ( ip_adjacency_t adj)

adj_midchain_setup

Setup the adj as a mid-chain

Definition at line 132 of file adj_midchain.c.

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

◆ adj_nbr_midchain_get_tx_node()

static u32 adj_nbr_midchain_get_tx_node ( ip_adjacency_t adj)
static

Definition at line 119 of file adj_midchain.c.

+ 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 
)

adj_nbr_midchain_stack

[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)

adj_nbr_midchain_unstack

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 
)

adj_nbr_midchain_update_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:

Variable Documentation

◆ adj_midchain_dpo_vft

const static dpo_vft_t adj_midchain_dpo_vft
static
Initial value:
= {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_midchain,
.dv_get_urpf = adj_dpo_get_urpf,
.dv_get_mtu = adj_dpo_get_mtu,
}

Definition at line 515 of file adj_midchain.c.

◆ midchain_ethernet_nodes

const static char* const midchain_ethernet_nodes[]
static
Initial value:
=
{
"adj-l2-midchain",
NULL,
}

Definition at line 545 of file adj_midchain.c.

◆ midchain_ip4_nodes

const static char* const midchain_ip4_nodes[]
static
Initial value:
=
{
"ip4-midchain",
NULL,
}

The per-protocol VLIB graph nodes that are assigned to a midchain object.

this means that these graph nodes are ones from which a midchain is the parent object in the DPO-graph.

Definition at line 530 of file adj_midchain.c.

◆ midchain_ip6_nodes

const static char* const midchain_ip6_nodes[]
static
Initial value:
=
{
"ip6-midchain",
NULL,
}

Definition at line 535 of file adj_midchain.c.

◆ midchain_mpls_nodes

const static char* const midchain_mpls_nodes[]
static
Initial value:
=
{
"mpls-midchain",
NULL,
}

Definition at line 540 of file adj_midchain.c.

◆ midchain_nodes

const static char* const * const midchain_nodes[DPO_PROTO_NUM]
static

◆ midchain_nsh_nodes

const static char* const midchain_nsh_nodes[]
static
Initial value:
=
{
"adj-nsh-midchain",
NULL,
}

Definition at line 550 of file adj_midchain.c.

adj_dpo_get_urpf
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
Definition: adj.c:321
midchain_ethernet_nodes
const static char *const midchain_ethernet_nodes[]
Definition: adj_midchain.c:545
midchain_nsh_nodes
const static char *const midchain_nsh_nodes[]
Definition: adj_midchain.c:550
adj_dpo_get_mtu
u16 adj_dpo_get_mtu(const dpo_id_t *dpo)
Definition: adj.c:331
midchain_ip4_nodes
const static char *const midchain_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a midchain object.
Definition: adj_midchain.c:530
midchain_ip6_nodes
const static char *const midchain_ip6_nodes[]
Definition: adj_midchain.c:535
adj_dpo_unlock
static void adj_dpo_unlock(dpo_id_t *dpo)
Definition: adj_midchain.c:510
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
DPO_PROTO_MPLS
@ DPO_PROTO_MPLS
Definition: dpo.h:66
adj_dpo_lock
static void adj_dpo_lock(dpo_id_t *dpo)
Definition: adj_midchain.c:505
format_adj_midchain
u8 * format_adj_midchain(u8 *s, va_list *ap)
Format a midchain adjacency.
Definition: adj_midchain.c:474
midchain_mpls_nodes
const static char *const midchain_mpls_nodes[]
Definition: adj_midchain.c:540
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
DPO_PROTO_NSH
@ DPO_PROTO_NSH
Definition: dpo.h:69
DPO_PROTO_ETHERNET
@ DPO_PROTO_ETHERNET
Definition: dpo.h:67