FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
geneve.c File Reference

GENEVE. More...

+ Include dependency graph for geneve.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_geneve_tunnel (u8 *s, va_list *args)
 
static u8format_geneve_name (u8 *s, va_list *args)
 
static clib_error_tgeneve_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_DEVICE_CLASS (geneve_device_class, static)
 
static u8format_geneve_header_with_length (u8 *s, va_list *args)
 
 VNET_HW_INTERFACE_CLASS (geneve_hw_class)
 
static void geneve_tunnel_restack_dpo (geneve_tunnel_t *t)
 
static geneve_tunnel_tgeneve_tunnel_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t geneve_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 GENEVE DIP to encap node. More...
 
static fib_node_tgeneve_tunnel_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static void geneve_tunnel_last_lock_gone (fib_node_t *node)
 Function definition to inform the FIB node that its last lock has gone. More...
 
static int geneve_rewrite (geneve_tunnel_t *t, bool is_ip6)
 
static bool geneve_decap_next_is_valid (geneve_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)
 
typedef CLIB_PACKED (union{struct{fib_node_index_t mfib_entry_index;adj_index_t mcast_adj_index;};u64 as_u64;})
 
static void mcast_shared_add (ip46_address_t *remote, fib_node_index_t mfei, adj_index_t ai)
 
static void mcast_shared_remove (ip46_address_t *remote)
 
int vnet_geneve_add_del_tunnel (vnet_geneve_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
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_tgeneve_add_del_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_geneve_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void vnet_int_geneve_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable)
 
static clib_error_tset_ip_geneve_bypass (u32 is_ip6, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_ip4_geneve_bypass (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_ip6_geneve_bypass (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tgeneve_init (vlib_main_t *vm)
 

Variables

geneve_main_t geneve_main
 
static const fib_node_vft_t geneve_vft
 
static vlib_cli_command_t create_geneve_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_geneve_tunnel_command) More...
 
static vlib_cli_command_t show_geneve_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_geneve_tunnel_command) More...
 
static vlib_cli_command_t set_interface_ip_geneve_bypass_command
 (constructor) VLIB_CLI_COMMAND (set_interface_ip_geneve_bypass_command) More...
 
static vlib_cli_command_t set_interface_ip6_geneve_bypass_command
 (constructor) VLIB_CLI_COMMAND (set_interface_ip6_geneve_bypass_command) More...
 

Detailed Description

GENEVE.

GENEVE 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 GENEVE 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.

Definition in file geneve.c.

Macro Definition Documentation

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

Definition at line 191 of file geneve.c.

Function Documentation

typedef CLIB_PACKED ( union{struct{fib_node_index_t mfib_entry_index;adj_index_t mcast_adj_index;};u64 as_u64;}  )

Definition at line 311 of file geneve.c.

+ Here is the call graph for this function:

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

Definition at line 41 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 105 of file geneve.c.

+ Here is the call graph for this function:

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

Definition at line 79 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_geneve_tunnel ( u8 s,
va_list *  args 
)

Definition at line 58 of file geneve.c.

+ Here is the call graph for this function:

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

Definition at line 650 of file geneve.c.

+ Here is the call graph for this function:

static bool geneve_decap_next_is_valid ( geneve_main_t vxm,
u32  is_ip6,
u32  decap_next_index 
)
static

Definition at line 271 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* geneve_init ( vlib_main_t vm)

Definition at line 1090 of file geneve.c.

+ Here is the call graph for this function:

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

Definition at line 86 of file geneve.c.

+ Here is the call graph for this function:

static int geneve_rewrite ( geneve_tunnel_t t,
bool  is_ip6 
)
static

Definition at line 200 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_node_back_walk_rc_t geneve_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 GENEVE DIP to encap node.

Definition at line 147 of file geneve.c.

+ Here is the call graph for this function:

static fib_node_t* geneve_tunnel_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 157 of file geneve.c.

static geneve_tunnel_t* geneve_tunnel_from_fib_node ( fib_node_t node)
static

Definition at line 135 of file geneve.c.

+ Here is the caller graph for this function:

static void geneve_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 171 of file geneve.c.

static void geneve_tunnel_restack_dpo ( geneve_tunnel_t t)
static

Definition at line 121 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword get_decap_next_for_node ( u32  node_index,
u32  ipv4_set 
)
static

Definition at line 618 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mcast_shared_add ( ip46_address_t *  remote,
fib_node_index_t  mfei,
adj_index_t  ai 
)
inlinestatic

Definition at line 332 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mcast_shared_remove ( ip46_address_t *  remote)
inlinestatic

Definition at line 344 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 976 of file geneve.c.

+ Here is the call graph for this function:

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

Definition at line 1033 of file geneve.c.

+ Here is the call graph for this function:

static clib_error_t* set_ip_geneve_bypass ( u32  is_ip6,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 932 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 881 of file geneve.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 629 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( geneve_device_class  ,
static   
)

+ Here is the caller graph for this function:

int vnet_geneve_add_del_tunnel ( vnet_geneve_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 355 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( geneve_hw_class  )

+ Here is the caller graph for this function:

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

Definition at line 920 of file geneve.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 283 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vtep_addr_unref ( ip46_address_t *  ip)
static

Definition at line 297 of file geneve.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t create_geneve_tunnel_command
static
Initial value:
= {
.path = "create geneve tunnel",
.short_help =
"create geneve tunnel local <local-vtep-addr>"
" {remote <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 * geneve_add_del_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: geneve.c:650

(constructor) VLIB_CLI_COMMAND (create_geneve_tunnel_command)

Definition at line 870 of file geneve.c.

geneve_main_t geneve_main

Definition at line 38 of file geneve.c.

const fib_node_vft_t geneve_vft
static
Initial value:
= {
.fnv_last_lock = geneve_tunnel_last_lock_gone,
.fnv_back_walk = geneve_tunnel_back_walk,
}
static fib_node_back_walk_rc_t geneve_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 GENEVE DIP to encap ...
Definition: geneve.c:147
static void geneve_tunnel_last_lock_gone(fib_node_t *node)
Function definition to inform the FIB node that its last lock has gone.
Definition: geneve.c:171
static fib_node_t * geneve_tunnel_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: geneve.c:157

Definition at line 184 of file geneve.c.

vlib_cli_command_t set_interface_ip6_geneve_bypass_command
static
Initial value:
= {
.path = "set interface ip6 geneve-bypass",
.function = set_ip6_geneve_bypass,
.short_help = "set interface ip geneve-bypass <interface> [del]",
}
static clib_error_t * set_ip6_geneve_bypass(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: geneve.c:1033

(constructor) VLIB_CLI_COMMAND (set_interface_ip6_geneve_bypass_command)

Definition at line 1082 of file geneve.c.

vlib_cli_command_t set_interface_ip_geneve_bypass_command
static
Initial value:
= {
.path = "set interface ip geneve-bypass",
.function = set_ip4_geneve_bypass,
.short_help = "set interface ip geneve-bypass <interface> [del]",
}
static clib_error_t * set_ip4_geneve_bypass(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: geneve.c:976

(constructor) VLIB_CLI_COMMAND (set_interface_ip_geneve_bypass_command)

Definition at line 1025 of file geneve.c.

vlib_cli_command_t show_geneve_tunnel_command
static
Initial value:
= {
.path = "show geneve tunnel",
.short_help = "show geneve tunnel",
}
static clib_error_t * show_geneve_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: geneve.c:881

(constructor) VLIB_CLI_COMMAND (show_geneve_tunnel_command)

Definition at line 911 of file geneve.c.