FD.io VPP  v16.06
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)
 
 VNET_HW_INTERFACE_CLASS (mpls_gre_hw_interface_class)
 
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)
 
 VNET_HW_INTERFACE_CLASS (mpls_eth_hw_interface_class)
 
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...
 
vlib_cli_command_t create_mpls_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_mpls_tunnel_command) More...
 
vlib_cli_command_t show_mpls_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_mpls_tunnel_command) More...
 
vlib_cli_command_t create_mpls_ethernet_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_tunnel_command) More...
 
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 523 of file interface.c.

#define MPLS_ETH_OUTPUT_NEXT_OUTPUT   1

Definition at line 289 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 526 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 1829 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 1501 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 1018 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 1112 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 491 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 485 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 1163 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 1129 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 292 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 272 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 1236 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 679 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 1224 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 535 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 1184 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  )
VNET_HW_INTERFACE_CLASS ( mpls_gre_hw_interface_class  )
VNET_HW_INTERFACE_CLASS ( mpls_eth_hw_interface_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 1643 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 1267 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 721 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 957 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 1592 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
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:1829

(constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_policy_tunnel_command)

Definition at line 1924 of file interface.c.

vlib_cli_command_t create_mpls_ethernet_tunnel_command
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:1501

(constructor) VLIB_CLI_COMMAND (create_mpls_ethernet_tunnel_command)

Definition at line 1584 of file interface.c.

vlib_cli_command_t create_mpls_tunnel_command
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:1018

(constructor) VLIB_CLI_COMMAND (create_mpls_tunnel_command)

Definition at line 1105 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:535
#define foreach_mpls_post_rewrite_next
Definition: interface.c:523
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (mpls_post_rewrite_node)

Definition at line 663 of file interface.c.

vlib_cli_command_t show_mpls_tunnel_command
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:1184

(constructor) VLIB_CLI_COMMAND (show_mpls_tunnel_command)

Definition at line 1217 of file interface.c.