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

Go to the source code of this file.

Macros

#define MPLS_GRE_OUTPUT_NEXT_POST_REWRITE   1
 
#define MPLS_ETH_OUTPUT_NEXT_OUTPUT   1
 
#define foreach_mpls_post_rewrite_next   _ (IP4_LOOKUP, "ip4-lookup")
 

Enumerations

enum  mpls_post_rewrite_next_t { MPLS_POST_REWRITE_N_NEXT }
 

Functions

static uword mpls_gre_set_rewrite (vnet_main_t *vnm, u32 sw_if_index, u32 l3_type, void *dst_address, void *rewrite, uword max_rewrite_bytes)
 
static uword mpls_gre_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_mpls_gre_tunnel_name (u8 *s, va_list *args)
 
static u8format_mpls_gre_device (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (mpls_gre_device_class)
 
 VLIB_DEVICE_TX_FUNCTION_MULTIARCH (mpls_gre_device_class, mpls_gre_interface_tx)
 
static uword mpls_eth_set_rewrite (vnet_main_t *vnm, u32 sw_if_index, u32 l3_type, void *dst_address, void *rewrite, uword max_rewrite_bytes)
 
static uword mpls_eth_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_mpls_eth_tunnel_name (u8 *s, va_list *args)
 
static u8format_mpls_eth_device (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (mpls_eth_device_class)
 
 VLIB_DEVICE_TX_FUNCTION_MULTIARCH (mpls_eth_device_class, mpls_eth_interface_tx)
 
static uword mpls_post_rewrite (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8mpls_gre_rewrite (mpls_main_t *mm, mpls_gre_tunnel_t *t)
 
int vnet_mpls_gre_add_del_tunnel (ip4_address_t *src, ip4_address_t *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 outer_fib_id, u32 *tunnel_sw_if_index, u8 l2_only, u8 is_add)
 
int vnet_mpls_gre_delete_fib_tunnels (u32 fib_id)
 
static clib_error_tcreate_mpls_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_mpls_encap_index (u8 *s, va_list *args)
 
u8format_mpls_gre_tunnel (u8 *s, va_list *args)
 
u8format_mpls_ethernet_tunnel (u8 *s, va_list *args)
 
static clib_error_tshow_mpls_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tmpls_interface_init (vlib_main_t *vm)
 
static u8mpls_ethernet_rewrite (mpls_main_t *mm, mpls_eth_tunnel_t *t)
 
int vnet_mpls_ethernet_add_del_tunnel (u8 *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 tx_sw_if_index, u32 *tunnel_sw_if_index, u8 l2_only, u8 is_add)
 
static clib_error_tcreate_mpls_ethernet_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int vnet_mpls_policy_tunnel_add_rewrite (mpls_main_t *mm, mpls_encap_t *e, u32 policy_tunnel_index)
 
int vnet_mpls_ethernet_add_del_policy_tunnel (u8 *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 tx_sw_if_index, u32 *tunnel_sw_if_index, u32 classify_table_index, u32 *new_tunnel_index, u8 l2_only, u8 is_add)
 
static clib_error_tcreate_mpls_ethernet_policy_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

vlib_node_registration_t mpls_post_rewrite_node
 (constructor) VLIB_REGISTER_NODE (mpls_post_rewrite_node) More...
 
static vlib_cli_command_t create_mpls_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_mpls_tunnel_command) More...
 
static vlib_cli_command_t show_mpls_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_mpls_tunnel_command) More...
 
static vlib_cli_command_t create_mpls_ethernet_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_tunnel_command) More...
 
static vlib_cli_command_t create_mpls_ethernet_policy_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_policy_tunnel_command) More...
 

Macro Definition Documentation

#define foreach_mpls_post_rewrite_next   _ (IP4_LOOKUP, "ip4-lookup")

Definition at line 528 of file interface.c.

#define MPLS_ETH_OUTPUT_NEXT_OUTPUT   1

Definition at line 292 of file interface.c.

#define MPLS_GRE_OUTPUT_NEXT_POST_REWRITE   1

Definition at line 40 of file interface.c.

Enumeration Type Documentation

Enumerator
MPLS_POST_REWRITE_N_NEXT 

Definition at line 531 of file interface.c.

Function Documentation

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

Definition at line 1844 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 1510 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 1025 of file interface.c.

+ Here is the call graph for this function:

u8* format_mpls_encap_index ( u8 s,
va_list *  args 
)

Definition at line 1121 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 494 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 488 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_mpls_ethernet_tunnel ( u8 s,
va_list *  args 
)

Definition at line 1172 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 240 of file interface.c.

+ Here is the call graph for this function:

u8* format_mpls_gre_tunnel ( u8 s,
va_list *  args 
)

Definition at line 1138 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 234 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword mpls_eth_interface_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 295 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword mpls_eth_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 275 of file interface.c.

+ Here is the caller graph for this function:

static u8* mpls_ethernet_rewrite ( mpls_main_t mm,
mpls_eth_tunnel_t t 
)
static

Definition at line 1245 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword mpls_gre_interface_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 43 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* mpls_gre_rewrite ( mpls_main_t mm,
mpls_gre_tunnel_t t 
)
static

Definition at line 686 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword mpls_gre_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 23 of file interface.c.

+ Here is the caller graph for this function:

clib_error_t* mpls_interface_init ( vlib_main_t vm)

Definition at line 1233 of file interface.c.

+ Here is the call graph for this function:

static uword mpls_post_rewrite ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 540 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 1193 of file interface.c.

+ Here is the call graph for this function:

VLIB_DEVICE_TX_FUNCTION_MULTIARCH ( mpls_gre_device_class  ,
mpls_gre_interface_tx   
)

Definition at line 262 of file interface.c.

+ Here is the call graph for this function:

VLIB_DEVICE_TX_FUNCTION_MULTIARCH ( mpls_eth_device_class  ,
mpls_eth_interface_tx   
)

Definition at line 516 of file interface.c.

+ Here is the call graph for this function:

VNET_DEVICE_CLASS ( mpls_gre_device_class  )
VNET_DEVICE_CLASS ( mpls_eth_device_class  )
int vnet_mpls_ethernet_add_del_policy_tunnel ( u8 dst,
ip4_address_t intfc,
u32  mask_width,
u32  inner_fib_id,
u32  tx_sw_if_index,
u32 tunnel_sw_if_index,
u32  classify_table_index,
u32 new_tunnel_index,
u8  l2_only,
u8  is_add 
)

Definition at line 1658 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_ethernet_add_del_tunnel ( u8 dst,
ip4_address_t intfc,
u32  mask_width,
u32  inner_fib_id,
u32  tx_sw_if_index,
u32 tunnel_sw_if_index,
u8  l2_only,
u8  is_add 
)

Definition at line 1276 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_gre_add_del_tunnel ( ip4_address_t src,
ip4_address_t dst,
ip4_address_t intfc,
u32  mask_width,
u32  inner_fib_id,
u32  outer_fib_id,
u32 tunnel_sw_if_index,
u8  l2_only,
u8  is_add 
)

Definition at line 728 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_gre_delete_fib_tunnels ( u32  fib_id)

Definition at line 964 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_policy_tunnel_add_rewrite ( mpls_main_t mm,
mpls_encap_t e,
u32  policy_tunnel_index 
)

Definition at line 1607 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t create_mpls_ethernet_policy_tunnel_command
static
Initial value:
= {
.path = "create mpls ethernet policy tunnel",
.short_help =
"create mpls ethernet policy tunnel [del] dst <mac-addr> intfc <addr>/<mw>\n"
" classify-table-index <nn>",
}
static clib_error_t * create_mpls_ethernet_policy_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:1844

(constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_policy_tunnel_command)

Definition at line 1941 of file interface.c.

vlib_cli_command_t create_mpls_ethernet_tunnel_command
static
Initial value:
= {
.path = "create mpls ethernet tunnel",
.short_help =
"create mpls ethernet tunnel [del] dst <mac-addr> intfc <addr>/<mw>",
}
static clib_error_t * create_mpls_ethernet_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:1510

(constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_tunnel_command)

Definition at line 1599 of file interface.c.

vlib_cli_command_t create_mpls_tunnel_command
static
Initial value:
= {
.path = "create mpls gre tunnel",
.short_help =
"create mpls gre tunnel [del] src <addr> dst <addr> intfc <addr>/<mw>",
}
static clib_error_t * create_mpls_gre_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:1025

(constructor) VLIB_CLI_COMMAND (create_mpls_tunnel_command)

Definition at line 1114 of file interface.c.

vlib_node_registration_t mpls_post_rewrite_node
Initial value:
= {
.function = mpls_post_rewrite,
.name = "mpls-post-rewrite",
.vector_size = sizeof (u32),
.runtime_data_bytes = 0,
.n_next_nodes = MPLS_POST_REWRITE_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static uword mpls_post_rewrite(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: interface.c:540
#define foreach_mpls_post_rewrite_next
Definition: interface.c:528
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (mpls_post_rewrite_node)

Definition at line 668 of file interface.c.

vlib_cli_command_t show_mpls_tunnel_command
static
Initial value:
= {
.path = "show mpls tunnel",
.short_help = "show mpls tunnel",
}
static clib_error_t * show_mpls_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:1193

(constructor) VLIB_CLI_COMMAND (show_mpls_tunnel_command)

Definition at line 1226 of file interface.c.