FD.io VPP  v16.09
Vector Packet Processing
lisp_gpe.c File Reference
+ Include dependency graph for lisp_gpe.c:

Go to the source code of this file.

Macros

#define foreach_copy_field
 

Functions

static int lisp_gpe_rewrite (lisp_gpe_tunnel_t *t, lisp_gpe_sub_tunnel_t *st, locator_pair_t *lp)
 
static int weight_cmp (normalized_sub_tunnel_weights_t *a, normalized_sub_tunnel_weights_t *b)
 
static void compute_sub_tunnels_balancing_vector (lisp_gpe_tunnel_t *t)
 Computes sub tunnel load balancing vector. More...
 
static void create_sub_tunnels (lisp_gpe_main_t *lgm, lisp_gpe_tunnel_t *t)
 
static int add_del_ip_tunnel (vnet_lisp_gpe_add_del_fwd_entry_args_t *a, u8 is_l2, u32 *tun_index_res)
 
static int build_ip_adjacency (lisp_gpe_main_t *lgm, ip_adjacency_t *adj, u32 table_id, u32 vni, u32 tun_index, u32 n_sub_tun, u8 is_negative, u8 action, u8 ip_ver)
 
static int add_del_ip_fwd_entry (lisp_gpe_main_t *lgm, vnet_lisp_gpe_add_del_fwd_entry_args_t *a)
 
static void make_mac_fib_key (BVT(clib_bihash_kv)*kv, u16 bd_index, u8 src_mac[6], u8 dst_mac[6])
 
u32 lisp_l2_fib_lookup (lisp_gpe_main_t *lgm, u16 bd_index, u8 src_mac[6], u8 dst_mac[6])
 
u32 lisp_l2_fib_add_del_entry (lisp_gpe_main_t *lgm, u16 bd_index, u8 src_mac[6], u8 dst_mac[6], u32 val, u8 is_add)
 
static void l2_fib_init (lisp_gpe_main_t *lgm)
 
static int add_del_l2_fwd_entry (lisp_gpe_main_t *lgm, vnet_lisp_gpe_add_del_fwd_entry_args_t *a)
 
int vnet_lisp_gpe_add_del_fwd_entry (vnet_lisp_gpe_add_del_fwd_entry_args_t *a, u32 *hw_if_indexp)
 
static clib_error_tlisp_gpe_add_del_fwd_entry_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_decap_next (u8 *s, va_list *args)
 
u8format_lisp_gpe_tunnel (u8 *s, va_list *args)
 
static clib_error_tshow_lisp_gpe_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8 vnet_lisp_gpe_enable_disable_status (void)
 
clib_error_tvnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t *a)
 
static clib_error_tlisp_gpe_enable_disable_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tlisp_show_iface_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_vnet_lisp_gpe_status (u8 *s, va_list *args)
 
clib_error_tlisp_gpe_init (vlib_main_t *vm)
 

Variables

lisp_gpe_main_t lisp_gpe_main
 
static vlib_cli_command_t lisp_gpe_add_del_fwd_entry_command
 (constructor) VLIB_CLI_COMMAND (lisp_gpe_add_del_fwd_entry_command) More...
 
static vlib_cli_command_t show_lisp_gpe_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command) More...
 
static vlib_cli_command_t enable_disable_lisp_gpe_command
 (constructor) VLIB_CLI_COMMAND (enable_disable_lisp_gpe_command) More...
 
vlib_cli_command_t lisp_show_iface_command
 (constructor) VLIB_CLI_COMMAND (lisp_show_iface_command) More...
 

Macro Definition Documentation

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

Definition at line 218 of file lisp_gpe.c.

Function Documentation

static int add_del_ip_fwd_entry ( lisp_gpe_main_t lgm,
vnet_lisp_gpe_add_del_fwd_entry_args_t a 
)
static

Definition at line 389 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int add_del_ip_tunnel ( vnet_lisp_gpe_add_del_fwd_entry_args_t a,
u8  is_l2,
u32 tun_index_res 
)
static

Definition at line 226 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int add_del_l2_fwd_entry ( lisp_gpe_main_t lgm,
vnet_lisp_gpe_add_del_fwd_entry_args_t a 
)
static

Definition at line 510 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int build_ip_adjacency ( lisp_gpe_main_t lgm,
ip_adjacency_t adj,
u32  table_id,
u32  vni,
u32  tun_index,
u32  n_sub_tun,
u8  is_negative,
u8  action,
u8  ip_ver 
)
static

Definition at line 319 of file lisp_gpe.c.

+ Here is the caller graph for this function:

static void compute_sub_tunnels_balancing_vector ( lisp_gpe_tunnel_t t)
static

Computes sub tunnel load balancing vector.

Algorithm is identical to that used for building unequal-cost multipath adjacencies

Definition at line 110 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void create_sub_tunnels ( lisp_gpe_main_t lgm,
lisp_gpe_tunnel_t t 
)
static

Definition at line 195 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 700 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_lisp_gpe_tunnel ( u8 s,
va_list *  args 
)

Definition at line 719 of file lisp_gpe.c.

+ Here is the call graph for this function:

u8* format_vnet_lisp_gpe_status ( u8 s,
va_list *  args 
)

Definition at line 979 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void l2_fib_init ( lisp_gpe_main_t lgm)
static

Definition at line 502 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 565 of file lisp_gpe.c.

+ Here is the call graph for this function:

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

Definition at line 906 of file lisp_gpe.c.

+ Here is the call graph for this function:

clib_error_t* lisp_gpe_init ( vlib_main_t vm)

Definition at line 986 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int lisp_gpe_rewrite ( lisp_gpe_tunnel_t t,
lisp_gpe_sub_tunnel_t st,
locator_pair_t lp 
)
static

Definition at line 22 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 lisp_l2_fib_add_del_entry ( lisp_gpe_main_t lgm,
u16  bd_index,
u8  src_mac[6],
u8  dst_mac[6],
u32  val,
u8  is_add 
)

Definition at line 480 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 lisp_l2_fib_lookup ( lisp_gpe_main_t lgm,
u16  bd_index,
u8  src_mac[6],
u8  dst_mac[6] 
)

Definition at line 458 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 943 of file lisp_gpe.c.

+ Here is the call graph for this function:

static void make_mac_fib_key ( BVT(clib_bihash_kv)*  kv,
u16  bd_index,
u8  src_mac[6],
u8  dst_mac[6] 
)
static

Definition at line 449 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 760 of file lisp_gpe.c.

+ Here is the call graph for this function:

int vnet_lisp_gpe_add_del_fwd_entry ( vnet_lisp_gpe_add_del_fwd_entry_args_t a,
u32 hw_if_indexp 
)

Definition at line 539 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_lisp_gpe_enable_disable ( vnet_lisp_gpe_enable_disable_args_t a)

Definition at line 797 of file lisp_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 vnet_lisp_gpe_enable_disable_status ( void  )

Definition at line 789 of file lisp_gpe.c.

+ Here is the caller graph for this function:

static int weight_cmp ( normalized_sub_tunnel_weights_t a,
normalized_sub_tunnel_weights_t b 
)
static

Definition at line 98 of file lisp_gpe.c.

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t enable_disable_lisp_gpe_command
static
Initial value:
= {
.path = "lisp gpe",
.short_help = "lisp gpe [enable|disable]",
}
static clib_error_t * lisp_gpe_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lisp_gpe.c:906

(constructor) VLIB_CLI_COMMAND (enable_disable_lisp_gpe_command)

Definition at line 935 of file lisp_gpe.c.

vlib_cli_command_t lisp_gpe_add_del_fwd_entry_command
static
Initial value:
= {
.path = "lisp gpe tunnel",
.short_help = "lisp gpe tunnel add/del vni <vni> vrf <vrf> [leid <leid>]"
"reid <reid> [lloc <sloc> rloc <rloc>] [negative action <action>]",
}
static clib_error_t * lisp_gpe_add_del_fwd_entry_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lisp_gpe.c:565

(constructor) VLIB_CLI_COMMAND (lisp_gpe_add_del_fwd_entry_command)

Definition at line 691 of file lisp_gpe.c.

Definition at line 19 of file lisp_gpe.c.

vlib_cli_command_t lisp_show_iface_command
Initial value:
= {
.path = "show lisp gpe interface",
.short_help = "show lisp gpe interface",
}
static clib_error_t * lisp_show_iface_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lisp_gpe.c:943

(constructor) VLIB_CLI_COMMAND (lisp_show_iface_command)

Definition at line 971 of file lisp_gpe.c.

vlib_cli_command_t show_lisp_gpe_tunnel_command
static
Initial value:
=
{
.path = "show lisp gpe tunnel",
}
static clib_error_t * show_lisp_gpe_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lisp_gpe.c:760

(constructor) VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command)

Definition at line 781 of file lisp_gpe.c.