FD.io VPP  v16.09
Vector Packet Processing
vxlan.c File Reference

VXLAN. More...

+ Include dependency graph for vxlan.c:

Go to the source code of this file.

Macros

#define foreach_copy_field
 
#define foreach_copy_ipv4
 
#define foreach_copy_ipv6
 

Functions

static u8format_decap_next (u8 *s, va_list *args)
 
u8format_vxlan_tunnel (u8 *s, va_list *args)
 
static u8format_vxlan_name (u8 *s, va_list *args)
 
static uword dummy_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tvxlan_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_DEVICE_CLASS (vxlan_device_class, static)
 
static uword dummy_set_rewrite (vnet_main_t *vnm, u32 sw_if_index, u32 l3_type, void *dst_address, void *rewrite, uword max_rewrite_bytes)
 
static u8format_vxlan_header_with_length (u8 *s, va_list *args)
 
 VNET_HW_INTERFACE_CLASS (vxlan_hw_class)
 
static int vxlan4_rewrite (vxlan_tunnel_t *t)
 
static int vxlan6_rewrite (vxlan_tunnel_t *t)
 
int vnet_vxlan_add_del_tunnel (vnet_vxlan_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
static u32 fib4_index_from_fib_id (u32 fib_id)
 
static u32 fib6_index_from_fib_id (u32 fib_id)
 
static uword unformat_decap_next (unformat_input_t *input, va_list *args)
 
static clib_error_tvxlan_add_del_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_vxlan_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tvxlan_init (vlib_main_t *vm)
 

Variables

vxlan_main_t vxlan_main
 
static vlib_cli_command_t create_vxlan_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_vxlan_tunnel_command) More...
 
static vlib_cli_command_t show_vxlan_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_vxlan_tunnel_command) More...
 

Detailed Description

VXLAN.

VXLAN provides the features needed to allow L2 bridge domains (BDs) to span multiple servers. This is done by building an L2 overlay on top of an L3 network underlay using VXLAN tunnels.

This makes it possible for servers to be co-located in the same data center or be separated geographically as long as they are reachable through the underlay L3 network.

You can refer to this kind of L2 overlay bridge domain as a VXLAN (Virtual eXtensible VLAN) segment.

Definition in file vxlan.c.

Macro Definition Documentation

#define foreach_copy_field
Value:
_(vni) \
_(encap_fib_index) \
_(decap_next_index)

Definition at line 129 of file vxlan.c.

#define foreach_copy_ipv4
Value:
{ \
_(src.ip4.as_u32) \
_(dst.ip4.as_u32) \
}

Definition at line 134 of file vxlan.c.

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

Definition at line 139 of file vxlan.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 79 of file vxlan.c.

+ Here is the caller graph for this function:

static uword dummy_set_rewrite ( vnet_main_t vnm,
u32  sw_if_index,
u32  l3_type,
void *  dst_address,
void *  rewrite,
uword  max_rewrite_bytes 
)
static

Definition at line 106 of file vxlan.c.

+ Here is the caller graph for this function:

static u32 fib4_index_from_fib_id ( u32  fib_id)
static

Definition at line 395 of file vxlan.c.

+ Here is the caller graph for this function:

static u32 fib6_index_from_fib_id ( u32  fib_id)
static

Definition at line 407 of file vxlan.c.

+ Here is the caller graph for this function:

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

Definition at line 37 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 116 of file vxlan.c.

+ Here is the call graph for this function:

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

Definition at line 73 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_vxlan_tunnel ( u8 s,
va_list *  args 
)

Definition at line 57 of file vxlan.c.

+ Here is the call graph for this function:

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

Definition at line 599 of file vxlan.c.

+ Here is the call graph for this function:

static uword unformat_decap_next ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 419 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( vxlan_device_class  ,
static   
)

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( vxlan_hw_class  )

+ Here is the caller graph for this function:

int vnet_vxlan_add_del_tunnel ( vnet_vxlan_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 213 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int vxlan4_rewrite ( vxlan_tunnel_t t)
static

Definition at line 146 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int vxlan6_rewrite ( vxlan_tunnel_t t)
static

Definition at line 179 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 440 of file vxlan.c.

+ Here is the call graph for this function:

clib_error_t* vxlan_init ( vlib_main_t vm)

Definition at line 635 of file vxlan.c.

+ Here is the call graph for this function:

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

Definition at line 88 of file vxlan.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t create_vxlan_tunnel_command
static
Initial value:
= {
.path = "create vxlan tunnel",
.short_help =
"create vxlan tunnel src <local-vtep-addr> dst <remote-vtep-addr> vni <nn>"
" [encap-vrf-id <nn>] [decap-next [l2|ip4|ip6]] [del]",
}
static clib_error_t * vxlan_add_del_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vxlan.c:440

(constructor) VLIB_CLI_COMMAND (create_vxlan_tunnel_command)

Definition at line 589 of file vxlan.c.

vlib_cli_command_t show_vxlan_tunnel_command
static
Initial value:
= {
.path = "show vxlan tunnel",
.short_help = "show vxlan tunnel",
}
static clib_error_t * show_vxlan_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vxlan.c:599

(constructor) VLIB_CLI_COMMAND (show_vxlan_tunnel_command)

Definition at line 627 of file vxlan.c.

vxlan_main_t vxlan_main

Definition at line 35 of file vxlan.c.