|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
153 u32 indent = va_arg (*args,
u32);
258 if (0 != res)
return (res);
268 .as_u64 =
dst->as_u64
275 dst->as_u64 =
src->as_u64;
296 u32 *node_indices = NULL;
297 const char *node_name;
301 while (NULL != node_name)
313 return (node_indices);
331 const char *
const *
const * nodes)
350 const char *
const *
const * nodes)
427 dpo_edges[child_type][child_proto][parent_type],
433 if (~0 ==
dpo_edges[child_type][child_proto][parent_type][parent_proto])
455 while (NULL !=
dpo_nodes[child_type][child_proto][cc])
465 if (~0 ==
dpo_edges[child_type][child_proto][parent_type][parent_proto])
467 dpo_edges[child_type][child_proto][parent_type][parent_proto] = edge;
471 ASSERT(
dpo_edges[child_type][child_proto][parent_type][parent_proto] == edge);
481 return (
dpo_edges[child_type][child_proto][parent_type][parent_proto]);
496 return (
dpo_edges[child_type][child_proto][parent_type][parent_proto]);
519 tmp.dpoi_next_node = edge;
632 "Name",
"Size",
"in-use",
"allocated");
661 .path =
"show dpo memory",
663 .short_help =
"show dpo memory",
void receive_dpo_module_init(void)
u16 dpoi_next_node
The next VLIB node to follow.
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
int dpo_cmp(const dpo_id_t *dpo1, const dpo_id_t *dpo2)
Compare two Data-path objects.
index_t dpoi_index
the index of objects of that type
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
@ IP_LOOKUP_NEXT_ARP
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
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.
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.
static u32 dpo_get_next_node(dpo_type_t child_type, dpo_proto_t child_proto, const dpo_id_t *parent_dpo)
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
dpo_type_t dpoi_type
the type
static clib_error_t * dpo_memory_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t * dv_format
A format function.
static dpo_vft_t * dpo_vfts
Vector of virtual function tables for the DPO types.
u32 dpo_get_urpf(const dpo_id_t *dpo)
Get a uRPF interface for the DPO.
vlib_main_t vlib_node_runtime_t * node
static u32 * dpo_default_get_next_node(const dpo_id_t *dpo)
@ IP_LOOKUP_NEXT_GLEAN
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
void ip6_ll_dpo_module_init(void)
static clib_error_t * dpo_module_init(vlib_main_t *vm)
u8 * format_dpo_type(u8 *s, va_list *args)
format a DPO type
@ IP_LOOKUP_NEXT_MIDCHAIN
This packets follow a mid-chain adjacency.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void interface_tx_dpo_module_init(void)
static vlib_cli_command_t show_fib_memory
(constructor) VLIB_CLI_COMMAND (show_fib_memory)
void ip_null_dpo_module_init(void)
dpo_proto_t vnet_link_to_dpo_proto(vnet_link_t linkt)
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
void classify_dpo_module_init(void)
dpo_get_next_node_t dv_get_next_node
A function to get the next VLIB node given an instance of the DPO.
vnet_link_t dpo_proto_to_link(dpo_proto_t dp)
format a DPO protocol
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
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.
static const char * dpo_proto_names[]
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
dpo_get_urpf_t dv_get_urpf
Get uRPF interface.
#define vlib_worker_thread_barrier_sync(X)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
void load_balance_module_init(void)
void mpls_disp_dpo_module_init(void)
u16 dpo_get_mtu(const dpo_id_t *dpo)
Get the MTU DPO.
static int dpo_id_is_valid(const dpo_id_t *dpoi)
Return true if the DPO object is valid, i.e.
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type()
@ DPO_FIRST
A non-zero value first so we can spot unitialisation errors.
void lookup_dpo_module_init(void)
void dpo_lock(dpo_id_t *dpo)
Take a reference counting lock on the DPO.
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define VLIB_CLI_COMMAND(x,...)
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.
dpo_lock_fn_t dv_unlock
A reference counting unlock function.
dpo_lock_fn_t dv_lock
A reference counting lock function.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
dpo_proto_t dpoi_proto
the data-path protocol of the type.
@ DPO_ADJACENCY_MCAST_MIDCHAIN
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
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_p...
static u32 **** dpo_edges
Vector of edge indicies from parent DPO nodes to child.
static const char *const *const ** dpo_nodes
vector of graph node names associated with each DPO type and protocol.
dpo_mk_interpose_t dv_mk_interpose
Signal on an interposed child that the parent has changed.
#define vec_free(V)
Free vector's memory (no header).
static const char * dpo_type_names[]
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
description fragment has unexpected format
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
void dvr_dpo_module_init(void)
void interface_rx_dpo_module_init(void)
#define VLIB_INIT_FUNCTION(x)
void pw_cw_dpo_module_init(void)
dpo_get_mtu_t dv_get_mtu
Get MTU.
uword vlib_node_get_next(vlib_main_t *vm, uword node_index, uword next_node_index)
#define vec_foreach(var, vec)
Vector iterator.
void dpo_unlock(dpo_id_t *dpo)
Release a reference counting lock on the DPO.
void replicate_module_init(void)
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
A virtual function table regisitered for a DPO type.
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
static vlib_main_t * vlib_get_main(void)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
int dpo_is_adj(const dpo_id_t *dpo)
Return TRUE is the DPO is any type of adjacency.
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
@ DPO_ADJACENCY_INCOMPLETE
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.
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.
static dpo_type_t dpo_dynamic
The DPO type value that can be assigned to the next dynamic type registration.
void l3_proxy_dpo_module_init(void)
void punt_dpo_module_init(void)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
void mpls_label_dpo_module_init(void)
vl_api_fib_path_type_t type
dpo_mem_show_t dv_mem_show
A show memory usage function.
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
void drop_dpo_module_init(void)