FD.io VPP  v18.07-34-g55fbdb9
Vector Packet Processing
vxlan_gpe.h File Reference

VXLAN GPE definitions. More...

+ Include dependency graph for vxlan_gpe.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vxlan_gpe_tunnel_t
 Struct for VXLAN GPE tunnel. More...
 
struct  vxlan_gpe_main_t
 Struct for VXLAN GPE node state. More...
 
struct  vnet_vxlan_gpe_add_del_tunnel_args_t
 Struct for VXLAN GPE add/del args. More...
 

Macros

#define VXLAN_GPE_TUNNEL_IS_IPV4   1
 Flags for vxlan_gpe_tunnel_t. More...
 
#define foreach_vxlan_gpe_input_next
 next nodes for VXLAN GPE input More...
 
#define vxlan_gpe_error(n, s)   VXLAN_GPE_ERROR_##n,
 

Enumerations

enum  vxlan_gpe_input_next_t { VXLAN_GPE_INPUT_N_NEXT }
 struct for next nodes for VXLAN GPE input More...
 
enum  vxlan_gpe_input_error_t { VXLAN_GPE_N_ERROR }
 struct for VXLAN GPE errors More...
 
enum  vxlan_gpe_encap_next_t { VXLAN_GPE_ENCAP_NEXT_IP4_LOOKUP, VXLAN_GPE_ENCAP_NEXT_IP6_LOOKUP, VXLAN_GPE_ENCAP_NEXT_DROP, VXLAN_GPE_ENCAP_N_NEXT }
 Struct for defining VXLAN GPE next nodes. More...
 

Functions

typedef CLIB_PACKED (struct{ip4_header_t ip4;udp_header_t udp;vxlan_gpe_header_t vxlan;}) ip4_vxlan_gpe_header_t
 VXLAN GPE header struct. More...
 
typedef CLIB_PACKED (struct{ip6_header_t ip6;udp_header_t udp;vxlan_gpe_header_t vxlan;}) ip6_vxlan_gpe_header_t
 
typedef CLIB_PACKED (struct{union{struct{u32 local;u32 remote;u32 vni;u32 pad;};u64 as_u64[2];};}) vxlan4_gpe_tunnel_key_t
 Key struct for IPv4 VXLAN GPE tunnel. More...
 
typedef CLIB_PACKED (struct{ip6_address_t local;ip6_address_t remote;u32 vni;}) vxlan6_gpe_tunnel_key_t
 Key struct for IPv6 VXLAN GPE tunnel. More...
 
u8format_vxlan_gpe_encap_trace (u8 *s, va_list *args)
 Trace of packets encapsulated in VXLAN GPE. 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...
 
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...
 
void vxlan_gpe_unregister_decap_protocol (u8 protocol_id, uword next_node_index)
 
void vxlan_gpe_register_decap_protocol (u8 protocol_id, uword next_node_index)
 
void vnet_int_vxlan_gpe_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable)
 

Variables

vxlan_gpe_main_t vxlan_gpe_main
 
vlib_node_registration_t vxlan_gpe_encap_node
 (constructor) VLIB_REGISTER_NODE (vxlan_gpe_encap_node) More...
 
vlib_node_registration_t vxlan4_gpe_input_node
 (constructor) VLIB_REGISTER_NODE (vxlan4_gpe_input_node) More...
 
vlib_node_registration_t vxlan6_gpe_input_node
 (constructor) VLIB_REGISTER_NODE (vxlan6_gpe_input_node) More...
 

Detailed Description

VXLAN GPE definitions.

Definition in file vxlan_gpe.h.

Macro Definition Documentation

#define foreach_vxlan_gpe_input_next
Value:
_(DROP, "error-drop") \
_(IP4_INPUT, "ip4-input") \
_(IP6_INPUT, "ip6-input") \
_(L2_INPUT, "l2-input")
DROP
Definition: error.def:41

next nodes for VXLAN GPE input

Definition at line 171 of file vxlan_gpe.h.

#define vxlan_gpe_error (   n,
 
)    VXLAN_GPE_ERROR_##n,

Definition at line 189 of file vxlan_gpe.h.

#define VXLAN_GPE_TUNNEL_IS_IPV4   1

Flags for vxlan_gpe_tunnel_t.

Definition at line 168 of file vxlan_gpe.h.

Enumeration Type Documentation

Struct for defining VXLAN GPE next nodes.

Enumerator
VXLAN_GPE_ENCAP_NEXT_IP4_LOOKUP 
VXLAN_GPE_ENCAP_NEXT_IP6_LOOKUP 
VXLAN_GPE_ENCAP_NEXT_DROP 
VXLAN_GPE_ENCAP_N_NEXT 

Definition at line 261 of file vxlan_gpe.h.

struct for VXLAN GPE errors

Enumerator
VXLAN_GPE_N_ERROR 

Definition at line 187 of file vxlan_gpe.h.

struct for next nodes for VXLAN GPE input

Enumerator
VXLAN_GPE_INPUT_N_NEXT 

Definition at line 178 of file vxlan_gpe.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip4_header_t ip4;udp_header_t udp;vxlan_gpe_header_t vxlan;}  )

VXLAN GPE header struct.

typedef CLIB_PACKED ( struct{ip6_header_t ip6;udp_header_t udp;vxlan_gpe_header_t vxlan;}  )
typedef CLIB_PACKED ( struct{union{struct{u32 local;u32 remote;u32 vni;u32 pad;};u64 as_u64[2];};}  )

Key struct for IPv4 VXLAN GPE tunnel.

Key fields: local remote, vni all fields in NET byte order VNI shifted 8 bits

typedef CLIB_PACKED ( struct{ip6_address_t local;ip6_address_t remote;u32 vni;}  )

Key struct for IPv6 VXLAN GPE tunnel.

Key fields: local remote, vni all fields in NET byte order VNI shifted 8 bits

u8* format_vxlan_gpe_encap_trace ( u8 s,
va_list *  args 
)

Trace of packets encapsulated in VXLAN GPE.

Parameters
*s
*args
Returns
*s

Definition at line 69 of file encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_int_vxlan_gpe_bypass_mode ( u32  sw_if_index,
u8  is_ip6,
u8  is_enable 
)

Definition at line 1043 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ 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 469 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 278 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 336 of file vxlan_gpe.c.

+ Here is the caller graph for this function:

void vxlan_gpe_register_decap_protocol ( u8  protocol_id,
uword  next_node_index 
)

Definition at line 685 of file decap.c.

+ Here is the caller graph for this function:

void vxlan_gpe_unregister_decap_protocol ( u8  protocol_id,
uword  next_node_index 
)

Definition at line 693 of file decap.c.

Variable Documentation

vlib_node_registration_t vxlan4_gpe_input_node

(constructor) VLIB_REGISTER_NODE (vxlan4_gpe_input_node)

Definition at line 730 of file decap.c.

vlib_node_registration_t vxlan6_gpe_input_node

(constructor) VLIB_REGISTER_NODE (vxlan6_gpe_input_node)

Definition at line 755 of file decap.c.

vlib_node_registration_t vxlan_gpe_encap_node

(constructor) VLIB_REGISTER_NODE (vxlan_gpe_encap_node)

Definition at line 392 of file encap.c.

vxlan_gpe_main_t vxlan_gpe_main

Definition at line 45 of file vxlan_gpe.c.