FD.io VPP  v21.06-3-gbb25fbf28
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
 
struct  vrrp_accept_owner_trace_t
 

Macros

#define foreach_vrrp_error
 
#define foreach_vrrp_accept_owner_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 }
 
enum  vrrp_accept_owner_error_t { VRRP_ACCEPT_OWNER_N_ERROR }
 
enum  vrrp_accept_owner_next_t { VRRP_ACCEPT_OWNER_NEXT_PROCESS, VRRP_ACCEPT_OWNER_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 u8format_vrrp_accept_owner_trace (u8 *s, va_list *args)
 
static_always_inline void vrrp_accept_owner_next_node (u32 sw_if_index, u8 vr_id, u8 is_ipv6, u32 *next_index, u32 *error)
 
static_always_inline uword vrrp_accept_owner_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ipv6)
 
VLIB_NODE_FN() vrrp4_accept_owner_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (vrrp4_accept_owner_mc, static)
 
VLIB_NODE_FN() vrrp6_accept_owner_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (vrrp6_accept_owner_mc, static)
 
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 []
 
static char * vrrp_accept_owner_error_strings []
 
vlib_node_registration_t vrrp4_accept_owner_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp4_accept_owner_input_node) More...
 
vlib_node_registration_t vrrp6_accept_owner_input_node
 (constructor) VLIB_REGISTER_NODE (vrrp6_accept_owner_input_node) More...
 

Macro Definition Documentation

◆ foreach_vrrp_accept_owner_error

#define foreach_vrrp_accept_owner_error
Value:
_(RECEIVED, "VRRP owner accept packets received") \
_(PROCESSED, "VRRP owner accept advertisements processed")

Definition at line 767 of file node.c.

◆ 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_accept_owner_error_t

Enumerator
VRRP_ACCEPT_OWNER_N_ERROR 

Definition at line 771 of file node.c.

◆ vrrp_accept_owner_next_t

Enumerator
VRRP_ACCEPT_OWNER_NEXT_PROCESS 
VRRP_ACCEPT_OWNER_N_NEXT 

Definition at line 785 of file node.c.

◆ vrrp_arp_next_t

Enumerator
VRRP_ARP_INPUT_NEXT_DROP 
VRRP_ARP_INPUT_NEXT_REPLY_TX 
VRRP_ARP_N_NEXT 

Definition at line 260 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 267 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_accept_owner_trace()

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

Definition at line 746 of file node.c.

◆ format_vrrp_arp_nd_input_trace()

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

Definition at line 244 of file node.c.

◆ 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/4]

VNET_FEATURE_INIT ( vrrp4_accept_owner_mc  ,
static   
)

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( vrrp4_arp_feat_node  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( vrrp6_accept_owner_mc  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( vrrp6_nd_feat_node  ,
static   
)

◆ vrrp4_accept_owner_input_node()

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

Definition at line 1023 of file node.c.

+ Here is the call graph for this function:

◆ 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 485 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 690 of file node.c.

+ Here is the call graph for this function:

◆ vrrp6_accept_owner_input_node()

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

Definition at line 1054 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 714 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 518 of file node.c.

+ Here is the call graph for this function:

◆ vrrp_accept_owner_input_inline()

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

Definition at line 806 of file node.c.

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

◆ vrrp_accept_owner_next_node()

static_always_inline void vrrp_accept_owner_next_node ( u32  sw_if_index,
u8  vr_id,
u8  is_ipv6,
u32 next_index,
u32 error 
)

Definition at line 792 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller 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 408 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 275 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 1086 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 552 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 199 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 166 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 130 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_accept_owner_input_node

vlib_node_registration_t vrrp4_accept_owner_input_node
Initial value:
=
{
.name = "vrrp4-accept-owner-input",
.vector_size = sizeof (u32),
.n_next_nodes = VRRP_ACCEPT_OWNER_N_NEXT,
.next_nodes = {
[VRRP_ACCEPT_OWNER_NEXT_PROCESS] = "vrrp4-input",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp4_accept_owner_input_node)

Definition at line 1030 of file node.c.

◆ 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",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp4_arp_input_node)

Definition at line 493 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",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp4_input_node)

Definition at line 697 of file node.c.

◆ vrrp6_accept_owner_input_node

vlib_node_registration_t vrrp6_accept_owner_input_node
Initial value:
=
{
.name = "vrrp6-accept-owner-input",
.vector_size = sizeof (u32),
.n_next_nodes = VRRP_ACCEPT_OWNER_N_NEXT,
.next_nodes = {
[VRRP_ACCEPT_OWNER_NEXT_PROCESS] = "vrrp6-input",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp6_accept_owner_input_node)

Definition at line 1061 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",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp6_input_node)

Definition at line 720 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",
},
}

(constructor) VLIB_REGISTER_NODE (vrrp6_nd_input_node)

Definition at line 526 of file node.c.

◆ vrrp_accept_owner_error_strings

char* vrrp_accept_owner_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 779 of file node.c.

◆ vrrp_error_strings

char* vrrp_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 77 of file node.c.

format_vrrp_trace
static u8 * format_vrrp_trace(u8 *s, va_list *args)
Definition: node.c:30
VRRP_ND_N_NEXT
@ VRRP_ND_N_NEXT
Definition: node.c:271
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
vrrp_error_strings
static char * vrrp_error_strings[]
Definition: node.c:77
foreach_vrrp_error
#define foreach_vrrp_error
Definition: node.c:60
VRRP_ACCEPT_OWNER_NEXT_PROCESS
@ VRRP_ACCEPT_OWNER_NEXT_PROCESS
Definition: node.c:787
VRRP_ARP_INPUT_NEXT_DROP
@ VRRP_ARP_INPUT_NEXT_DROP
Definition: node.c:262
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
foreach_vrrp_accept_owner_error
#define foreach_vrrp_accept_owner_error
Definition: node.c:767
VRRP_ACCEPT_OWNER_N_NEXT
@ VRRP_ACCEPT_OWNER_N_NEXT
Definition: node.c:788
VRRP_ARP_N_NEXT
@ VRRP_ARP_N_NEXT
Definition: node.c:264
VRRP_ND_INPUT_NEXT_DROP
@ VRRP_ND_INPUT_NEXT_DROP
Definition: node.c:269
vrrp_accept_owner_error_strings
static char * vrrp_accept_owner_error_strings[]
Definition: node.c:779
VRRP_ARP_INPUT_NEXT_REPLY_TX
@ VRRP_ARP_INPUT_NEXT_REPLY_TX
Definition: node.c:263
u32
unsigned int u32
Definition: types.h:88
format_vrrp_arp_nd_input_trace
static u8 * format_vrrp_arp_nd_input_trace(u8 *s, va_list *va)
Definition: node.c:244
format_vrrp_accept_owner_trace
static u8 * format_vrrp_accept_owner_trace(u8 *s, va_list *args)
Definition: node.c:746
VRRP_INPUT_N_NEXT
@ VRRP_INPUT_N_NEXT
Definition: node.c:86
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
VRRP_INPUT_NEXT_DROP
@ VRRP_INPUT_NEXT_DROP
Definition: node.c:85
VRRP_ND_INPUT_NEXT_REPLY_TX
@ VRRP_ND_INPUT_NEXT_REPLY_TX
Definition: node.c:270