FD.io VPP  v17.01.1-3-gc6833f8
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
 

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 u8format_vxlan_header_with_length (u8 *s, va_list *args)
 
 VNET_HW_INTERFACE_CLASS (vxlan_hw_class)
 
static void vxlan_tunnel_restack_dpo (vxlan_tunnel_t *t)
 
static vxlan_tunnel_tvxlan_tunnel_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t vxlan_tunnel_back_walk (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 Function definition to backwalk a FIB node - Here we will restack the new dpo of VXLAN DIP to encap node. More...
 
static fib_node_tvxlan_tunnel_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static void vxlan_tunnel_last_lock_gone (fib_node_t *node)
 Function definition to inform the FIB node that its last lock has gone. More...
 
static int vxlan4_rewrite (vxlan_tunnel_t *t)
 
static int vxlan6_rewrite (vxlan_tunnel_t *t)
 
static int vxlan_check_decap_next (vxlan_main_t *vxm, u32 is_ip6, u32 decap_next_index)
 
static uword vtep_addr_ref (ip46_address_t *ip)
 
static uword vtep_addr_unref (ip46_address_t *ip)
 
static mcast_remote_tmcast_ep_get (ip46_address_t *ip)
 
static void mcast_ep_add (mcast_remote_t *new_ep)
 
static void mcast_ep_remove (mcast_remote_t *ep)
 
static void ip46_multicast_ethernet_address (u8 *ethernet_address, ip46_address_t *ip)
 
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 get_decap_next_for_node (u32 node_index, u32 ipv4_set)
 
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 const fib_node_vft_t vxlan_vft
 
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) \
_(mcast_sw_if_index) \
_(encap_fib_index) \
_(decap_next_index) \
_(src) \
_(dst)

Definition at line 197 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 83 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 589 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 601 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 41 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 110 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 77 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 uword get_decap_next_for_node ( u32  node_index,
u32  ipv4_set 
)
static

Definition at line 613 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ip46_multicast_ethernet_address ( u8 ethernet_address,
ip46_address_t *  ip 
)
static

Definition at line 347 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mcast_ep_add ( mcast_remote_t new_ep)
static

Definition at line 330 of file vxlan.c.

+ Here is the caller graph for this function:

static mcast_remote_t* mcast_ep_get ( ip46_address_t *  ip)
static

Definition at line 321 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mcast_ep_remove ( mcast_remote_t ep)
static

Definition at line 340 of file vxlan.c.

+ Here is the caller 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 842 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 631 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 355 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vtep_addr_ref ( ip46_address_t *  ip)
static

Definition at line 293 of file vxlan.c.

+ Here is the caller graph for this function:

static uword vtep_addr_unref ( ip46_address_t *  ip)
static

Definition at line 305 of file vxlan.c.

+ Here is the caller graph for this function:

static int vxlan4_rewrite ( vxlan_tunnel_t t)
static

Definition at line 205 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 238 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 652 of file vxlan.c.

+ Here is the call graph for this function:

static int vxlan_check_decap_next ( vxlan_main_t vxm,
u32  is_ip6,
u32  decap_next_index 
)
static

Definition at line 271 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vxlan_init ( vlib_main_t vm)

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

+ Here is the call graph for this function:

static fib_node_back_walk_rc_t vxlan_tunnel_back_walk ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Function definition to backwalk a FIB node - Here we will restack the new dpo of VXLAN DIP to encap node.

Definition at line 152 of file vxlan.c.

+ Here is the call graph for this function:

static fib_node_t* vxlan_tunnel_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 163 of file vxlan.c.

static vxlan_tunnel_t* vxlan_tunnel_from_fib_node ( fib_node_t node)
static

Definition at line 138 of file vxlan.c.

+ Here is the caller graph for this function:

static void vxlan_tunnel_last_lock_gone ( fib_node_t node)
static

Function definition to inform the FIB node that its last lock has gone.

Definition at line 177 of file vxlan.c.

static void vxlan_tunnel_restack_dpo ( vxlan_tunnel_t t)
static

Definition at line 124 of file vxlan.c.

+ Here is the call graph for this function:

+ Here is the caller 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>|group <mcast-vtep-addr> <intf-name>} vni <nn>"
" [encap-vrf-id <nn>] [decap-next [l2|node <name>]] [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:652

(constructor) VLIB_CLI_COMMAND (create_vxlan_tunnel_command)

Definition at line 831 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:842

(constructor) VLIB_CLI_COMMAND (show_vxlan_tunnel_command)

Definition at line 870 of file vxlan.c.

vxlan_main_t vxlan_main

Definition at line 39 of file vxlan.c.

const fib_node_vft_t vxlan_vft
static
Initial value:
= {
.fnv_last_lock = vxlan_tunnel_last_lock_gone,
.fnv_back_walk = vxlan_tunnel_back_walk,
}
static fib_node_back_walk_rc_t vxlan_tunnel_back_walk(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Function definition to backwalk a FIB node - Here we will restack the new dpo of VXLAN DIP to encap n...
Definition: vxlan.c:152
static void vxlan_tunnel_last_lock_gone(fib_node_t *node)
Function definition to inform the FIB node that its last lock has gone.
Definition: vxlan.c:177
static fib_node_t * vxlan_tunnel_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: vxlan.c:163

Definition at line 190 of file vxlan.c.