FD.io VPP
v19.04-6-g6f05f72
Vector Packet Processing
|
Go to the source code of this file.
Functions | |
dpo_proto_t | vnet_link_to_dpo_proto (vnet_link_t linkt) |
vnet_link_t | dpo_proto_to_link (dpo_proto_t dp) |
format a DPO protocol More... | |
u8 * | format_dpo_type (u8 *s, va_list *args) |
format a DPO type More... | |
u8 * | format_dpo_id (u8 *s, va_list *args) |
Format a DPO_id_t oject More... | |
u8 * | format_dpo_proto (u8 *s, va_list *args) |
format a DPO protocol More... | |
void | dpo_set (dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index) |
Set/create a DPO ID The DPO will be locked. More... | |
void | dpo_reset (dpo_id_t *dpo) |
reset a DPO ID The DPO will be unlocked. More... | |
int | dpo_cmp (const dpo_id_t *dpo1, const dpo_id_t *dpo2) |
Compare two Data-path objects. More... | |
void | dpo_copy (dpo_id_t *dst, const dpo_id_t *src) |
atomic copy a data-plane object. More... | |
int | dpo_is_adj (const dpo_id_t *dpo) |
Return TRUE is the DPO is any type of adjacency. More... | |
static u32 * | dpo_default_get_next_node (const dpo_id_t *dpo) |
static void | dpo_default_mk_interpose (const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone) |
A default variant of the make interpose function that just returns the original. More... | |
void | dpo_register (dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes) |
For a given DPO type Register: More... | |
dpo_type_t | dpo_register_new_type (const dpo_vft_t *vft, const char *const *const *nodes) |
Create and register a new DPO type. More... | |
void | dpo_mk_interpose (const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone) |
Make an interpose DPO from an original. More... | |
void | dpo_lock (dpo_id_t *dpo) |
Take a reference counting lock on the DPO. More... | |
void | dpo_unlock (dpo_id_t *dpo) |
Release a reference counting lock on the DPO. More... | |
u32 | dpo_get_urpf (const dpo_id_t *dpo) |
Get a uRPF interface for the DPO. More... | |
static u32 | dpo_get_next_node (dpo_type_t child_type, dpo_proto_t child_proto, const dpo_id_t *parent_dpo) |
u32 | dpo_get_next_node_by_type_and_proto (dpo_type_t child_type, dpo_proto_t child_proto, dpo_type_t parent_type, dpo_proto_t parent_proto) |
return already stacked up next node index for a given child_type/child_proto and parent_type/patent_proto. More... | |
static void | dpo_stack_i (u32 edge, dpo_id_t *dpo, const dpo_id_t *parent) |
Stack one DPO object on another, and thus establish a child parent relationship. More... | |
void | dpo_stack (dpo_type_t child_type, dpo_proto_t child_proto, dpo_id_t *dpo, const dpo_id_t *parent) |
Stack one DPO object on another, and thus establish a child-parent relationship. More... | |
void | dpo_stack_from_node (u32 child_node_index, dpo_id_t *dpo, const dpo_id_t *parent) |
Stack one DPO object on another, and thus establish a child parent relationship. More... | |
static clib_error_t * | dpo_module_init (vlib_main_t *vm) |
static clib_error_t * | dpo_memory_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Variables | |
static const char * | dpo_type_names [] = DPO_TYPES |
A Data-Path Object is an object that represents actions that are applied to packets are they are switched through VPP. More... | |
static const char * | dpo_proto_names [] = DPO_PROTOS |
static dpo_vft_t * | dpo_vfts |
Vector of virtual function tables for the DPO types. More... | |
static const char *const *const ** | dpo_nodes |
vector of graph node names associated with each DPO type and protocol. More... | |
static u32 **** | dpo_edges |
Vector of edge indicies from parent DPO nodes to child. More... | |
static dpo_type_t | dpo_dynamic = DPO_LAST |
The DPO type value that can be assigned to the next dynamic type registration. More... | |
static vlib_cli_command_t | show_fib_memory |
(constructor) VLIB_CLI_COMMAND (show_fib_memory) More... | |
|
static |
u32 dpo_get_next_node_by_type_and_proto | ( | dpo_type_t | child_type, |
dpo_proto_t | child_proto, | ||
dpo_type_t | parent_type, | ||
dpo_proto_t | parent_proto | ||
) |
return already stacked up next node index for a given child_type/child_proto and parent_type/patent_proto.
Return already stacked up next node index for a given child_type/child_proto and parent_type/patent_proto.
The VLIB graph arc used is taken from the parent and child types passed.
int dpo_is_adj | ( | const dpo_id_t * | dpo | ) |
void dpo_lock | ( | dpo_id_t * | dpo | ) |
|
static |
|
static |
vnet_link_t dpo_proto_to_link | ( | dpo_proto_t | dp | ) |
void dpo_register | ( | dpo_type_t | type, |
const dpo_vft_t * | vft, | ||
const char *const *const * | nodes | ||
) |
For a given DPO type Register:
type | The type being registered. |
vft | The virtual function table to register for the type. |
nodes | The string description of the per-protocol VLIB graph nodes. |
Definition at line 321 of file dpo.c.
dpo_type_t dpo_register_new_type | ( | const dpo_vft_t * | vft, |
const char *const *const * | nodes | ||
) |
Create and register a new DPO type.
This can be used by plugins to create new DPO types that are not listed in dpo_type_t enum
vft | The virtual function table to register for the type. |
nodes | The string description of the per-protocol VLIB graph nodes. |
Definition at line 341 of file dpo.c.
void dpo_reset | ( | dpo_id_t * | dpo | ) |
void dpo_set | ( | dpo_id_t * | dpo, |
dpo_type_t | type, | ||
dpo_proto_t | proto, | ||
index_t | index | ||
) |
void dpo_stack | ( | dpo_type_t | child_type, |
dpo_proto_t | child_proto, | ||
dpo_id_t * | dpo, | ||
const dpo_id_t * | parent | ||
) |
Stack one DPO object on another, and thus establish a child parent relationship.
Set and stack a DPO.
A new VLIB graph arc is created from the child node passed to the nodes registered by the parent. The VLIB infra will ensure this arc is added only once.
Definition at line 530 of file dpo.c.
void dpo_unlock | ( | dpo_id_t * | dpo | ) |
dpo_proto_t vnet_link_to_dpo_proto | ( | vnet_link_t | linkt | ) |
|
static |
|
static |
Vector of edge indicies from parent DPO nodes to child.
dpo_edges[child_type][child_proto][parent_type][parent_proto] = edge_index
This array is derived at init time from the dpo_nodes above. Note that the third dimension in dpo_nodes is lost, hence, the edge index from each node MUST be the same. Including both the child and parent protocol is required to support the case where it changes as the graph is traversed, most notably when an MPLS label is popped.
Note that this array is child type specific, not child instance specific.
|
static |
vector of graph node names associated with each DPO type and protocol.
dpo_nodes[child_type][child_proto][node_X] = node_name; i.e. dpo_node[DPO_LOAD_BALANCE][DPO_PROTO_IP4][0] = "ip4-lookup" dpo_node[DPO_LOAD_BALANCE][DPO_PROTO_IP4][1] = "ip4-load-balance"
This is a vector so we can dynamically register new DPO types in plugins.
|
static |
|
static |
A Data-Path Object is an object that represents actions that are applied to packets are they are switched through VPP.
The DPO is a base class that is specialised by other objects to provide concrete actions
The VLIB graph nodes are graph of types, the DPO graph is a graph of instances. Array of char* names for the DPO types and protos
|
static |
|
static |
(constructor) VLIB_CLI_COMMAND (show_fib_memory)