FD.io VPP  v20.05.1-5-g09f167997
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  vrrp_trace_t
 
struct  vrrp_input_process_args
 
struct  vrrp_arp_nd_trace_t
 

Macros

#define foreach_vrrp_error
 

Typedefs

typedef struct vrrp_input_process_args vrrp_input_process_args_t
 

Enumerations

enum  vrrp_error_t { VRRP_N_ERROR }
 
enum  vrrp_next_t { VRRP_INPUT_NEXT_DROP, VRRP_INPUT_N_NEXT }
 
enum  vrrp_arp_next_t { VRRP_ARP_INPUT_NEXT_DROP, VRRP_ARP_INPUT_NEXT_REPLY_TX, VRRP_ARP_N_NEXT }
 
enum  vrrp_nd_next_t { VRRP_ND_INPUT_NEXT_DROP, VRRP_ND_INPUT_NEXT_REPLY_TX, VRRP_ND_N_NEXT }
 

Functions

static u8format_vrrp_trace (u8 *s, va_list *args)
 
static int vrrp_vr_addr_cmp (vrrp_vr_t *vr, vrrp_header_t *pkt)
 
static void vrrp_input_process_master (vrrp_vr_t *vr, vrrp_header_t *pkt)
 
static void vrrp_input_process_backup (vrrp_vr_t *vr, vrrp_header_t *pkt)
 
static void vrrp_input_process (vrrp_input_process_args_t *args)
 
static u8format_vrrp_arp_nd_input_trace (u8 *s, va_list *va)
 
static_always_inline void vrrp_arp_nd_next (vlib_buffer_t *b, u32 *next_index, u32 *vr_index, u8 is_ipv6)
 
static_always_inline uword vrrp_arp_nd_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ipv6)
 
VLIB_NODE_FN() vrrp4_arp_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (vrrp4_arp_feat_node, static)
 
VLIB_NODE_FN() vrrp6_nd_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (vrrp6_nd_feat_node, static)
 
static_always_inline uword vrrp_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ipv6)
 
VLIB_NODE_FN() vrrp4_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() vrrp6_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tvrrp_input_init (vlib_main_t *vm)
 

Variables

vlib_node_registration_t vrrp4_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp4_input_node) More...
 
vlib_node_registration_t vrrp6_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp6_input_node) More...
 
vlib_node_registration_t vrrp4_arp_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp4_arp_input_node) More...
 
vlib_node_registration_t vrrp6_nd_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp6_nd_input_node) More...
 
static char * vrrp_error_strings []
 

Macro Definition Documentation

◆ foreach_vrrp_error

#define foreach_vrrp_error
Value:
_(RECEIVED, "VRRP packets processed") \
_(BAD_TTL, "VRRP advertisement TTL is not 255") \
_(NOT_VERSION_3, "VRRP version is not 3") \
_(INCOMPLETE_PKT, "VRRP packet has wrong size") \
_(BAD_CHECKSUM, "VRRP checksum is invalid") \
_(UNKNOWN_VR, "VRRP message does not match known VRs") \
_(ADDR_MISMATCH, "VR addrs do not match configuration")

Definition at line 60 of file node.c.

Typedef Documentation

◆ vrrp_input_process_args_t

Enumeration Type Documentation

◆ vrrp_arp_next_t

Enumerator
VRRP_ARP_INPUT_NEXT_DROP 
VRRP_ARP_INPUT_NEXT_REPLY_TX 
VRRP_ARP_N_NEXT 

Definition at line 261 of file node.c.

◆ vrrp_error_t

Enumerator
VRRP_N_ERROR 

Definition at line 69 of file node.c.

◆ vrrp_nd_next_t

Enumerator
VRRP_ND_INPUT_NEXT_DROP 
VRRP_ND_INPUT_NEXT_REPLY_TX 
VRRP_ND_N_NEXT 

Definition at line 268 of file node.c.

◆ vrrp_next_t

Enumerator
VRRP_INPUT_NEXT_DROP 
VRRP_INPUT_N_NEXT 

Definition at line 83 of file node.c.

Function Documentation

◆ format_vrrp_arp_nd_input_trace()

static u8* format_vrrp_arp_nd_input_trace ( u8 s,
va_list *  va 
)
static

Definition at line 245 of file node.c.

+ Here is the call graph for this function:

◆ format_vrrp_trace()

static u8* format_vrrp_trace ( u8 s,
va_list *  args 
)
static

Definition at line 30 of file node.c.

+ Here is the call graph for this function:

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( vrrp4_arp_feat_node  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( vrrp6_nd_feat_node  ,
static   
)

◆ vrrp4_arp_input_node()

VLIB_NODE_FN() vrrp4_arp_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 479 of file node.c.

+ Here is the call graph for this function:

◆ vrrp4_input_node()

VLIB_NODE_FN() vrrp4_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 684 of file node.c.

+ Here is the call graph for this function:

◆ vrrp6_input_node()

VLIB_NODE_FN() vrrp6_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 708 of file node.c.

+ Here is the call graph for this function:

◆ vrrp6_nd_input_node()

VLIB_NODE_FN() vrrp6_nd_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 512 of file node.c.

+ Here is the call graph for this function:

◆ vrrp_arp_nd_input_inline()

static_always_inline uword vrrp_arp_nd_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ipv6 
)

Definition at line 402 of file node.c.

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

◆ vrrp_arp_nd_next()

static_always_inline void vrrp_arp_nd_next ( vlib_buffer_t b,
u32 next_index,
u32 vr_index,
u8  is_ipv6 
)

Definition at line 276 of file node.c.

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

◆ vrrp_input_init()

static clib_error_t* vrrp_input_init ( vlib_main_t vm)
static

Definition at line 732 of file node.c.

+ Here is the call graph for this function:

◆ vrrp_input_inline()

static_always_inline uword vrrp_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ipv6 
)

Definition at line 546 of file node.c.

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

◆ vrrp_input_process()

static void vrrp_input_process ( vrrp_input_process_args_t args)
inlinestatic

Definition at line 200 of file node.c.

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

◆ vrrp_input_process_backup()

static void vrrp_input_process_backup ( vrrp_vr_t vr,
vrrp_header_t *  pkt 
)
static

Definition at line 167 of file node.c.

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

◆ vrrp_input_process_master()

static void vrrp_input_process_master ( vrrp_vr_t vr,
vrrp_header_t *  pkt 
)
static

Definition at line 131 of file node.c.

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

◆ vrrp_vr_addr_cmp()

static int vrrp_vr_addr_cmp ( vrrp_vr_t vr,
vrrp_header_t *  pkt 
)
static

Definition at line 101 of file node.c.

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

Variable Documentation

◆ vrrp4_arp_input_node

vlib_node_registration_t vrrp4_arp_input_node
Initial value:
=
{
.name = "vrrp4-arp-input",
.vector_size = sizeof (u32),
.error_strings = vrrp_error_strings,
.n_next_nodes = VRRP_ARP_N_NEXT,
.next_nodes = {
[VRRP_ARP_INPUT_NEXT_DROP] = "error-drop",
[VRRP_ARP_INPUT_NEXT_REPLY_TX] = "interface-output",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * vrrp_error_strings[]
Definition: node.c:77
#define ARRAY_LEN(x)
Definition: clib.h:66
static u8 * format_vrrp_arp_nd_input_trace(u8 *s, va_list *va)
Definition: node.c:245

(constructor) VLIB_REGISTER_NODE (vrrp4_arp_input_node)

Definition at line 487 of file node.c.

◆ vrrp4_input_node

vlib_node_registration_t vrrp4_input_node
Initial value:
=
{
.name = "vrrp4-input",
.vector_size = sizeof (u32),
.format_trace = format_vrrp_trace,
.error_strings = vrrp_error_strings,
.n_next_nodes = VRRP_INPUT_N_NEXT,
.next_nodes = {
[VRRP_INPUT_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * vrrp_error_strings[]
Definition: node.c:77
#define ARRAY_LEN(x)
Definition: clib.h:66
static u8 * format_vrrp_trace(u8 *s, va_list *args)
Definition: node.c:30

(constructor) VLIB_REGISTER_NODE (vrrp4_input_node)

Definition at line 691 of file node.c.

◆ vrrp6_input_node

vlib_node_registration_t vrrp6_input_node
Initial value:
=
{
.name = "vrrp6-input",
.vector_size = sizeof (u32),
.format_trace = format_vrrp_trace,
.error_strings = vrrp_error_strings,
.n_next_nodes = VRRP_INPUT_N_NEXT,
.next_nodes = {
[VRRP_INPUT_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * vrrp_error_strings[]
Definition: node.c:77
#define ARRAY_LEN(x)
Definition: clib.h:66
static u8 * format_vrrp_trace(u8 *s, va_list *args)
Definition: node.c:30

(constructor) VLIB_REGISTER_NODE (vrrp6_input_node)

Definition at line 714 of file node.c.

◆ vrrp6_nd_input_node

vlib_node_registration_t vrrp6_nd_input_node
Initial value:
=
{
.name = "vrrp6-nd-input",
.vector_size = sizeof (u32),
.error_strings = vrrp_error_strings,
.n_next_nodes = VRRP_ND_N_NEXT,
.next_nodes = {
[VRRP_ND_INPUT_NEXT_DROP] = "error-drop",
[VRRP_ND_INPUT_NEXT_REPLY_TX] = "interface-output",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * vrrp_error_strings[]
Definition: node.c:77
#define ARRAY_LEN(x)
Definition: clib.h:66
static u8 * format_vrrp_arp_nd_input_trace(u8 *s, va_list *va)
Definition: node.c:245

(constructor) VLIB_REGISTER_NODE (vrrp6_nd_input_node)

Definition at line 520 of file node.c.

◆ vrrp_error_strings

char* vrrp_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_vrrp_error
Definition: node.c:60

Definition at line 77 of file node.c.