FD.io VPP  v20.09-64-g4f7b92f0a
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 768 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 772 of file node.c.

◆ vrrp_accept_owner_next_t

Enumerator
VRRP_ACCEPT_OWNER_NEXT_PROCESS 
VRRP_ACCEPT_OWNER_N_NEXT 

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

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

Definition at line 747 of file node.c.

+ Here is the call graph for this function:

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

VNET_FEATURE_INIT ( vrrp4_arp_feat_node  ,
static   
)

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( vrrp6_nd_feat_node  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( vrrp4_accept_owner_mc  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( vrrp6_accept_owner_mc  ,
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 1024 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 486 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 691 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 1055 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 715 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 519 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 807 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 793 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 409 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 1087 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 553 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_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",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_vrrp_accept_owner_trace(u8 *s, va_list *args)
Definition: node.c:747
static char * vrrp_accept_owner_error_strings[]
Definition: node.c:780

(constructor) VLIB_REGISTER_NODE (vrrp4_accept_owner_input_node)

Definition at line 1031 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",
},
}
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:67
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 494 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:67
static u8 * format_vrrp_trace(u8 *s, va_list *args)
Definition: node.c:30

(constructor) VLIB_REGISTER_NODE (vrrp4_input_node)

Definition at line 698 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",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_vrrp_accept_owner_trace(u8 *s, va_list *args)
Definition: node.c:747
static char * vrrp_accept_owner_error_strings[]
Definition: node.c:780

(constructor) VLIB_REGISTER_NODE (vrrp6_accept_owner_input_node)

Definition at line 1062 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:67
static u8 * format_vrrp_trace(u8 *s, va_list *args)
Definition: node.c:30

(constructor) VLIB_REGISTER_NODE (vrrp6_input_node)

Definition at line 721 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:67
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 527 of file node.c.

◆ vrrp_accept_owner_error_strings

char* vrrp_accept_owner_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_vrrp_accept_owner_error
Definition: node.c:768

Definition at line 780 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.