FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
node.c File Reference

2 x LACP graph nodes: an "interior" node to process incoming announcements, and a "process" node to periodically send announcements. More...

+ Include dependency graph for node.c:

Go to the source code of this file.

Enumerations

enum  lacp_next_t { LACP_INPUT_NEXT_NORMAL, LACP_INPUT_N_NEXT }
 

Functions

static uword lacp_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword lacp_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 

Variables

lacp_state_struct lacp_state_array []
 
static vlib_node_registration_t lacp_process_node
 (constructor) VLIB_REGISTER_NODE (lacp_process_node) More...
 
static char * lacp_error_strings []
 
static vlib_node_registration_t lacp_input_node
 (constructor) VLIB_REGISTER_NODE (lacp_input_node) More...
 

Detailed Description

2 x LACP graph nodes: an "interior" node to process incoming announcements, and a "process" node to periodically send announcements.

The interior node is neither pipelined nor dual-looped, because it would be very unusual to see more than one LACP packet in a given input frame. So, it's a very simple / straighforward example.

Definition in file node.c.

Enumeration Type Documentation

◆ lacp_next_t

Enumerator
LACP_INPUT_NEXT_NORMAL 
LACP_INPUT_N_NEXT 

Definition at line 57 of file node.c.

Function Documentation

◆ lacp_node_fn()

static uword lacp_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 68 of file node.c.

+ Here is the call graph for this function:

◆ lacp_process()

static uword lacp_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 143 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ lacp_error_strings

char* lacp_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_lacp_error
Definition: node.h:61

Definition at line 46 of file node.c.

◆ lacp_input_node

vlib_node_registration_t lacp_input_node
static
Initial value:
= {
.function = lacp_node_fn,
.name = "lacp-input",
.vector_size = sizeof (u32),
.n_errors = LACP_N_ERROR,
.error_strings = lacp_error_strings,
.format_trace = lacp_input_format_trace,
.n_next_nodes = LACP_INPUT_N_NEXT,
.next_nodes = {
[LACP_INPUT_NEXT_NORMAL] = "error-drop",
},
}
u8 * lacp_input_format_trace(u8 *s, va_list *args)
Definition: input.c:241
unsigned int u32
Definition: types.h:88
static char * lacp_error_strings[]
Definition: node.c:46
static uword lacp_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:68

(constructor) VLIB_REGISTER_NODE (lacp_input_node)

Definition at line 121 of file node.c.

◆ lacp_process_node

static vlib_node_registration_t lacp_process_node
static
Initial value:
= {
.function = lacp_process,
.name = "lacp-process",
}
static uword lacp_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: node.c:143

(constructor) VLIB_REGISTER_NODE (lacp_process_node)

Definition at line 28 of file node.c.

◆ lacp_state_array

lacp_state_struct lacp_state_array[]
Initial value:
= {
#define _(b, s, n)
{.str = NULL}
}
#define NULL
Definition: clib.h:58
#define foreach_lacp_state_flag
Definition: protocol.h:71

Definition at line 21 of file node.c.