FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
vxlan_gpe.c File Reference

Common utility functions for IPv4 and IPv6 VXLAN GPE tunnels. More...

+ Include dependency graph for vxlan_gpe.c:

Go to the source code of this file.

Macros

#define foreach_gpe_copy_field
 
#define foreach_copy_ipv4
 
#define foreach_copy_ipv6
 

Functions

u8format_vxlan_gpe_tunnel (u8 *s, va_list *args)
 Tracing function for VXLAN GPE tunnel packets. More...
 
static u8format_vxlan_gpe_name (u8 *s, va_list *args)
 Naming for VXLAN GPE tunnel. More...
 
static uword dummy_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tvxlan_gpe_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 CLI function for VXLAN GPE admin up/down. More...
 
 VNET_DEVICE_CLASS (vxlan_gpe_device_class, static)
 
static u8format_vxlan_gpe_header_with_length (u8 *s, va_list *args)
 Formatting function for tracing VXLAN GPE with length. More...
 
 VNET_HW_INTERFACE_CLASS (vxlan_gpe_hw_class)
 
int vxlan4_gpe_rewrite (vxlan_gpe_tunnel_t *t, u32 extension_size, u8 protocol_override, uword encap_next_node)
 Calculate IPv4 VXLAN GPE rewrite header. More...
 
int vxlan6_gpe_rewrite (vxlan_gpe_tunnel_t *t, u32 extension_size, u8 protocol_override, uword encap_next_node)
 Calculate IPv6 VXLAN GPE rewrite header. More...
 
int vnet_vxlan_gpe_add_del_tunnel (vnet_vxlan_gpe_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 Add or Del a VXLAN GPE tunnel. More...
 
static clib_error_tvxlan_gpe_add_del_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_vxlan_gpe_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 CLI function for showing VXLAN GPE tunnels. More...
 
clib_error_tvxlan_gpe_init (vlib_main_t *vm)
 Feature init function for VXLAN GPE. More...
 

Variables

vxlan_gpe_main_t vxlan_gpe_main
 
static vlib_cli_command_t create_vxlan_gpe_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_vxlan_gpe_tunnel_command) More...
 
static vlib_cli_command_t show_vxlan_gpe_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_vxlan_gpe_tunnel_command) More...
 

Detailed Description

Common utility functions for IPv4 and IPv6 VXLAN GPE tunnels.

Definition in file vxlan_gpe.c.

Macro Definition Documentation

#define foreach_copy_ipv4
Value:
{ \
_(local.ip4.as_u32) \
_(remote.ip4.as_u32) \
}

Definition at line 155 of file vxlan_gpe.c.

#define foreach_copy_ipv6
Value:
{ \
_(local.ip6.as_u64[0]) \
_(local.ip6.as_u64[1]) \
_(remote.ip6.as_u64[0]) \
_(remote.ip6.as_u64[1]) \
}

Definition at line 160 of file vxlan_gpe.c.

#define foreach_gpe_copy_field
Value:
_(vni) \
_(protocol) \
_(encap_fib_index) \
_(decap_fib_index)

Definition at line 149 of file vxlan_gpe.c.

Function Documentation

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

Definition at line 87 of file vxlan_gpe.c.

+ Here is the caller graph for this function:

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

Formatting function for tracing VXLAN GPE with length.

Parameters
*s
*args
Returns
*s

Definition at line 134 of file vxlan_gpe.c.

+ Here is the call graph for this function:

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

Naming for VXLAN GPE tunnel.

Parameters
*sformatting string
*args
Returns
*s formatted string

Definition at line 81 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_vxlan_gpe_tunnel ( u8 s,
va_list *  args 
)

Tracing function for VXLAN GPE tunnel packets.

Parameters
*sformatting string
*args
Returns
*s formatted string

Definition at line 35 of file vxlan_gpe.c.

+ Here is the call graph for this function:

static clib_error_t* show_vxlan_gpe_tunnel_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

CLI function for showing VXLAN GPE tunnels.

Parameters
*vm
*input
*cmd
Returns
error

Definition at line 628 of file vxlan_gpe.c.

+ Here is the call graph for this function:

VNET_DEVICE_CLASS ( vxlan_gpe_device_class  ,
static   
)

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( vxlan_gpe_hw_class  )

+ Here is the caller graph for this function:

int vnet_vxlan_gpe_add_del_tunnel ( vnet_vxlan_gpe_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Add or Del a VXLAN GPE tunnel.

Parameters
*a
*sw_if_index
Returns
rc

Definition at line 292 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vxlan4_gpe_rewrite ( vxlan_gpe_tunnel_t t,
u32  extension_size,
u8  protocol_override,
uword  encap_next_node 
)

Calculate IPv4 VXLAN GPE rewrite header.

Parameters
*t
Returns
rc

Definition at line 176 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vxlan6_gpe_rewrite ( vxlan_gpe_tunnel_t t,
u32  extension_size,
u8  protocol_override,
uword  encap_next_node 
)

Calculate IPv6 VXLAN GPE rewrite header.

Parameters
*t
Returns
rc

Definition at line 233 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* vxlan_gpe_add_del_tunnel_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 437 of file vxlan_gpe.c.

+ Here is the call graph for this function:

clib_error_t* vxlan_gpe_init ( vlib_main_t vm)

Feature init function for VXLAN GPE.

Parameters
*vm
Returns
error

Definition at line 659 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* vxlan_gpe_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

CLI function for VXLAN GPE admin up/down.

Parameters
*vnm
hw_if_index
flag
Returns
*rc

Definition at line 106 of file vxlan_gpe.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t create_vxlan_gpe_tunnel_command
static
Initial value:
= {
.path = "create vxlan-gpe tunnel",
.short_help =
"create vxlan-gpe tunnel local <local-addr> remote <remote-addr>"
" vni <nn> [next-ip4][next-ip6][next-ethernet][next-nsh]"
" [encap-vrf-id <nn>] [decap-vrf-id <nn>]"
" [del]\n",
}
static clib_error_t * vxlan_gpe_add_del_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vxlan_gpe.c:437

(constructor) VLIB_CLI_COMMAND (create_vxlan_gpe_tunnel_command)

Definition at line 607 of file vxlan_gpe.c.

vlib_cli_command_t show_vxlan_gpe_tunnel_command
static
Initial value:
= {
.path = "show vxlan-gpe",
}
static clib_error_t * show_vxlan_gpe_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI function for showing VXLAN GPE tunnels.
Definition: vxlan_gpe.c:628

(constructor) VLIB_CLI_COMMAND (show_vxlan_gpe_tunnel_command)

Definition at line 646 of file vxlan_gpe.c.

vxlan_gpe_main_t vxlan_gpe_main

Definition at line 24 of file vxlan_gpe.c.