FD.io VPP  v17.07-30-g839fa73
Vector Packet Processing
interface.c File Reference
+ Include dependency graph for interface.c:

Go to the source code of this file.

Functions

static u64 gre4_mk_key (const ip4_address_t *src, const ip4_address_t *dst, u32 out_fib_index)
 
static u8format_gre_tunnel_type (u8 *s, va_list *args)
 
static u8format_gre_tunnel (u8 *s, va_list *args)
 
static gre_tunnel_tgre_tunnel_db_find (const ip46_address_t *src, const ip46_address_t *dst, u32 out_fib_index, u8 is_ipv6)
 
static void gre_tunnel_db_add (const gre_tunnel_t *t)
 
static void gre_tunnel_db_remove (const gre_tunnel_t *t)
 
static gre_tunnel_tgre_tunnel_from_fib_node (fib_node_t *node)
 
void gre_tunnel_stack (adj_index_t ai)
 gre_tunnel_stack More...
 
static adj_walk_rc_t gre_adj_walk_cb (adj_index_t ai, void *ctx)
 Call back when restacking all adjacencies on a GRE interface. More...
 
static void gre_tunnel_restack (gre_tunnel_t *gt)
 
static fib_node_back_walk_rc_t gre_tunnel_back_walk (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 Function definition to backwalk a FIB node. More...
 
static fib_node_tgre_tunnel_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static void gre_tunnel_last_lock_gone (fib_node_t *node)
 Function definition to inform the FIB node that its last lock has gone. More...
 
static int vnet_gre_tunnel_add (vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
static int vnet_gre_tunnel_delete (vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
int vnet_gre_add_del_tunnel (vnet_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
clib_error_tgre_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static clib_error_tcreate_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tgre_interface_init (vlib_main_t *vm)
 

Variables

static const char * gre_tunnel_type_names [] = GRE_TUNNEL_TYPE_NAMES
 
static const fib_node_vft_t gre_vft
 
static vlib_cli_command_t create_gre_tunnel_command
 (constructor) VLIB_CLI_COMMAND (create_gre_tunnel_command) More...
 
static vlib_cli_command_t show_gre_tunnel_command
 (constructor) VLIB_CLI_COMMAND (show_gre_tunnel_command) More...
 

Function Documentation

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

Definition at line 536 of file interface.c.

+ Here is the call graph for this function:

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

Definition at line 48 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 40 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 gre4_mk_key ( const ip4_address_t src,
const ip4_address_t dst,
u32  out_fib_index 
)
inlinestatic

Definition at line 31 of file interface.c.

+ Here is the caller graph for this function:

static adj_walk_rc_t gre_adj_walk_cb ( adj_index_t  ai,
void *  ctx 
)
static

Call back when restacking all adjacencies on a GRE interface.

Definition at line 209 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* gre_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)

Definition at line 504 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* gre_interface_init ( vlib_main_t vm)

Definition at line 700 of file interface.c.

+ Here is the call graph for this function:

static fib_node_back_walk_rc_t gre_tunnel_back_walk ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Function definition to backwalk a FIB node.

Definition at line 238 of file interface.c.

+ Here is the call graph for this function:

static void gre_tunnel_db_add ( const gre_tunnel_t t)
static

Definition at line 105 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gre_tunnel_t* gre_tunnel_db_find ( const ip46_address_t *  src,
const ip46_address_t *  dst,
u32  out_fib_index,
u8  is_ipv6 
)
static

Definition at line 75 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gre_tunnel_db_remove ( const gre_tunnel_t t)
static

Definition at line 130 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static fib_node_t* gre_tunnel_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 250 of file interface.c.

static gre_tunnel_t* gre_tunnel_from_fib_node ( fib_node_t node)
static

Definition at line 154 of file interface.c.

+ Here is the caller graph for this function:

static void gre_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 265 of file interface.c.

static void gre_tunnel_restack ( gre_tunnel_t gt)
static

Definition at line 218 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gre_tunnel_stack ( adj_index_t  ai)

gre_tunnel_stack

'stack' (resolve the recursion for) the tunnel's midchain adjacency

Definition at line 169 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 658 of file interface.c.

+ Here is the call graph for this function:

int vnet_gre_add_del_tunnel ( vnet_gre_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 494 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int vnet_gre_tunnel_add ( vnet_gre_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)
static

Definition at line 285 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int vnet_gre_tunnel_delete ( vnet_gre_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)
static

Definition at line 452 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_gre_tunnel_command
static
Initial value:
= {
.path = "create gre tunnel",
.short_help = "create gre tunnel src <addr> dst <addr> "
"[outer-fib-id <fib>] [teb] [del]",
}
static clib_error_t * create_gre_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:536

(constructor) VLIB_CLI_COMMAND (create_gre_tunnel_command)

Definition at line 650 of file interface.c.

const char* gre_tunnel_type_names[] = GRE_TUNNEL_TYPE_NAMES
static

Definition at line 28 of file interface.c.

const fib_node_vft_t gre_vft
static
Initial value:
= {
.fnv_last_lock = gre_tunnel_last_lock_gone,
.fnv_back_walk = gre_tunnel_back_walk,
}
static fib_node_t * gre_tunnel_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: interface.c:250
static fib_node_back_walk_rc_t gre_tunnel_back_walk(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Function definition to backwalk a FIB node.
Definition: interface.c:238
static void gre_tunnel_last_lock_gone(fib_node_t *node)
Function definition to inform the FIB node that its last lock has gone.
Definition: interface.c:265

Definition at line 278 of file interface.c.

vlib_cli_command_t show_gre_tunnel_command
static
Initial value:
= {
.path = "show gre tunnel",
}
static clib_error_t * show_gre_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:658

(constructor) VLIB_CLI_COMMAND (show_gre_tunnel_command)

Definition at line 694 of file interface.c.