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.

Data Structures

struct  lisp_gpe_tx_trace_t
 
struct  l2_lisp_gpe_tx_trace_t
 

Macros

#define foreach_lisp_gpe_tx_next
 
#define is_v4_packet(_h)   ((*(u8*) _h) & 0xF0) == 0x40
 
#define foreach_l2_lisp_gpe_tx_next
 

Enumerations

enum  lisp_gpe_tx_next_t { LISP_GPE_TX_N_NEXT }
 
enum  l2_lisp_gpe_tx_next_t { L2_LISP_GPE_TX_N_NEXT }
 

Functions

u8format_lisp_gpe_tx_trace (u8 *s, va_list *args)
 
static void get_one_tunnel_inline (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, lisp_gpe_tunnel_t **t0, u8 is_v4)
 
static void encap_one_inline (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, lisp_gpe_tunnel_t *t0, u32 *next0)
 
static void get_two_tunnels_inline (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, vlib_buffer_t *b1, lisp_gpe_tunnel_t **t0, lisp_gpe_tunnel_t **t1, u8 is_v4)
 
static void encap_two_inline (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, vlib_buffer_t *b1, lisp_gpe_tunnel_t *t0, lisp_gpe_tunnel_t *t1, u32 *next0, u32 *next1)
 
static uword lisp_gpe_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_lisp_gpe_name (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (lisp_gpe_device_class, static)
 
static uword dummy_set_rewrite (vnet_main_t *vnm, u32 sw_if_index, u32 l3_type, void *dst_address, void *rewrite, uword max_rewrite_bytes)
 
u8format_lisp_gpe_header_with_length (u8 *s, va_list *args)
 
 VNET_HW_INTERFACE_CLASS (lisp_gpe_hw_class)
 
int add_del_ip_prefix_route (ip_prefix_t *dst_prefix, u32 table_id, ip_adjacency_t *add_adj, u8 is_add, u32 *adj_index)
 
static void add_del_lisp_gpe_default_route (u32 table_id, u8 is_v4, u8 is_add)
 
static void lisp_gpe_iface_set_table (u32 sw_if_index, u32 table_id, u8 is_ip4)
 
u8format_l2_lisp_gpe_tx_trace (u8 *s, va_list *args)
 
static void l2_process_tunnel_action (vlib_buffer_t *b0, u8 action, u32 *next0)
 
static u32 ip_flow_hash (void *data)
 
static u32 l2_flow_hash (vlib_buffer_t *b0)
 
static void l2_process_one (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, u32 ti0, u32 *next0)
 
static void l2_process_two (lisp_gpe_main_t *lgm, vlib_buffer_t *b0, vlib_buffer_t *b1, u32 ti0, u32 ti1, u32 *next0, u32 *next1)
 
static uword l2_lisp_gpe_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_l2_lisp_gpe_name (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (l2_lisp_gpe_device_class, static)
 
static vnet_hw_interface_tcreate_lisp_gpe_iface (lisp_gpe_main_t *lgm, u32 vni, u32 dp_table, vnet_device_class_t *dev_class, tunnel_lookup_t *tuns)
 
static void remove_lisp_gpe_iface (lisp_gpe_main_t *lgm, u32 hi_index, u32 dp_table, tunnel_lookup_t *tuns)
 
static int lisp_gpe_add_del_l3_iface (lisp_gpe_main_t *lgm, vnet_lisp_gpe_add_del_iface_args_t *a)
 
static int lisp_gpe_add_del_l2_iface (lisp_gpe_main_t *lgm, vnet_lisp_gpe_add_del_iface_args_t *a)
 
int vnet_lisp_gpe_add_del_iface (vnet_lisp_gpe_add_del_iface_args_t *a, u32 *hw_if_indexp)
 
static clib_error_tlisp_gpe_add_del_iface_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static vlib_cli_command_t add_del_lisp_gpe_iface_command
 (constructor) VLIB_CLI_COMMAND (add_del_lisp_gpe_iface_command) More...
 

Macro Definition Documentation

#define foreach_l2_lisp_gpe_tx_next
Value:
_(DROP, "error-drop") \
_(IP4_LOOKUP, "ip4-lookup") \
_(IP6_LOOKUP, "ip6-lookup") \
_(LISP_CP_LOOKUP, "lisp-cp-lookup")
DROP
Definition: error.def:41

Definition at line 504 of file interface.c.

#define foreach_lisp_gpe_tx_next
Value:
_(DROP, "error-drop") \
_(IP4_LOOKUP, "ip4-lookup") \
_(IP6_LOOKUP, "ip6-lookup")
DROP
Definition: error.def:41

Definition at line 24 of file interface.c.

#define is_v4_packet (   _h)    ((*(u8*) _h) & 0xF0) == 0x40

Definition at line 194 of file interface.c.

Enumeration Type Documentation

Enumerator
L2_LISP_GPE_TX_N_NEXT 

Definition at line 510 of file interface.c.

Enumerator
LISP_GPE_TX_N_NEXT 

Definition at line 29 of file interface.c.

Function Documentation

int add_del_ip_prefix_route ( ip_prefix_t *  dst_prefix,
u32  table_id,
ip_adjacency_t add_adj,
u8  is_add,
u32 adj_index 
)

Definition at line 376 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void add_del_lisp_gpe_default_route ( u32  table_id,
u8  is_v4,
u8  is_add 
)
static

Definition at line 448 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_hw_interface_t* create_lisp_gpe_iface ( lisp_gpe_main_t lgm,
u32  vni,
u32  dp_table,
vnet_device_class_t dev_class,
tunnel_lookup_t tuns 
)
static

Definition at line 833 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword dummy_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 339 of file interface.c.

+ Here is the caller graph for this function:

static void encap_one_inline ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
lisp_gpe_tunnel_t t0,
u32 next0 
)
inlinestatic

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 encap_two_inline ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
vlib_buffer_t b1,
lisp_gpe_tunnel_t t0,
lisp_gpe_tunnel_t t1,
u32 next0,
u32 next1 
)
inlinestatic

Definition at line 137 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 816 of file interface.c.

+ Here is the call graph for this function:

u8* format_l2_lisp_gpe_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 524 of file interface.c.

+ Here is the call graph for this function:

u8* format_lisp_gpe_header_with_length ( u8 s,
va_list *  args 
)

Definition at line 346 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 322 of file interface.c.

+ Here is the call graph for this function:

u8* format_lisp_gpe_tx_trace ( u8 s,
va_list *  args 
)

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 void get_one_tunnel_inline ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
lisp_gpe_tunnel_t **  t0,
u8  is_v4 
)
inlinestatic

Definition at line 54 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void get_two_tunnels_inline ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
vlib_buffer_t b1,
lisp_gpe_tunnel_t **  t0,
lisp_gpe_tunnel_t **  t1,
u8  is_v4 
)
inlinestatic

Definition at line 104 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 ip_flow_hash ( void *  data)
inlinestatic

Definition at line 549 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 l2_flow_hash ( vlib_buffer_t b0)
inlinestatic

Definition at line 560 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 653 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void l2_process_one ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
u32  ti0,
u32 next0 
)
inlinestatic

Definition at line 587 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void l2_process_tunnel_action ( vlib_buffer_t b0,
u8  action,
u32 next0 
)
inlinestatic

Definition at line 535 of file interface.c.

+ Here is the caller graph for this function:

static void l2_process_two ( lisp_gpe_main_t lgm,
vlib_buffer_t b0,
vlib_buffer_t b1,
u32  ti0,
u32  ti1,
u32 next0,
u32 next1 
)
inlinestatic

Definition at line 609 of file interface.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_iface_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1078 of file interface.c.

+ Here is the call graph for this function:

static int lisp_gpe_add_del_l2_iface ( lisp_gpe_main_t lgm,
vnet_lisp_gpe_add_del_iface_args_t a 
)
static

Definition at line 999 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int lisp_gpe_add_del_l3_iface ( lisp_gpe_main_t lgm,
vnet_lisp_gpe_add_del_iface_args_t a 
)
static

Definition at line 918 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void lisp_gpe_iface_set_table ( u32  sw_if_index,
u32  table_id,
u8  is_ip4 
)
static

Definition at line 474 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 197 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void remove_lisp_gpe_iface ( lisp_gpe_main_t lgm,
u32  hi_index,
u32  dp_table,
tunnel_lookup_t tuns 
)
static

Definition at line 891 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( lisp_gpe_device_class  ,
static   
)
VNET_DEVICE_CLASS ( l2_lisp_gpe_device_class  ,
static   
)
VNET_HW_INTERFACE_CLASS ( lisp_gpe_hw_class  )
int vnet_lisp_gpe_add_del_iface ( vnet_lisp_gpe_add_del_iface_args_t a,
u32 hw_if_indexp 
)

Definition at line 1060 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 add_del_lisp_gpe_iface_command
static
Initial value:
= {
.path = "lisp gpe iface",
.short_help = "lisp gpe iface add/del vni <vni> vrf <vrf>",
}
static clib_error_t * lisp_gpe_add_del_iface_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: interface.c:1078

(constructor) VLIB_CLI_COMMAND (add_del_lisp_gpe_iface_command)

Definition at line 1145 of file interface.c.