FD.io VPP  v17.07.01-10-g3be13f0
Vector Packet Processing
interface_funcs.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_interface_output_runtime_t
 

Macros

#define VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT   VNET_INTERFACE_TX_N_NEXT
 

Typedefs

typedef void(* vnet_hw_sw_interface_walk_t) (vnet_main_t *vnm, u32 sw_if_index, void *ctx)
 Call back walk type for walking SW indices on a HW interface. More...
 

Enumerations

enum  vnet_interface_output_next_t { VNET_INTERFACE_OUTPUT_NEXT_DROP, VNET_INTERFACE_OUTPUT_NEXT_TX }
 
enum  vnet_interface_tx_next_t { VNET_INTERFACE_TX_NEXT_DROP, VNET_INTERFACE_TX_N_NEXT }
 
enum  vnet_interface_output_error_t { VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DOWN, VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DELETED }
 

Functions

static vnet_hw_interface_tvnet_get_hw_interface (vnet_main_t *vnm, u32 hw_if_index)
 
static vnet_sw_interface_tvnet_get_sw_interface (vnet_main_t *vnm, u32 sw_if_index)
 
static vnet_sw_interface_tvnet_get_sw_interface_safe (vnet_main_t *vnm, u32 sw_if_index)
 
static vnet_sw_interface_tvnet_get_hw_sw_interface (vnet_main_t *vnm, u32 hw_if_index)
 
static vnet_sw_interface_tvnet_get_sup_sw_interface (vnet_main_t *vnm, u32 sw_if_index)
 
static vnet_hw_interface_tvnet_get_sup_hw_interface (vnet_main_t *vnm, u32 sw_if_index)
 
static vnet_hw_interface_class_tvnet_get_hw_interface_class (vnet_main_t *vnm, u32 hw_class_index)
 
static vnet_device_class_tvnet_get_device_class (vnet_main_t *vnm, u32 dev_class_index)
 
static u8vnet_get_sw_interface_tag (vnet_main_t *vnm, u32 sw_if_index)
 
static void vnet_set_sw_interface_tag (vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
 
static void vnet_clear_sw_interface_tag (vnet_main_t *vnm, u32 sw_if_index)
 
void vnet_hw_interface_walk_sw (vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
 Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces. More...
 
u32 vnet_register_interface (vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
 
clib_error_tvnet_create_sw_interface (vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
 
void vnet_delete_hw_interface (vnet_main_t *vnm, u32 hw_if_index)
 
void vnet_delete_sw_interface (vnet_main_t *vnm, u32 sw_if_index)
 
int vnet_sw_interface_is_p2p (vnet_main_t *vnm, u32 sw_if_index)
 
static uword vnet_sw_interface_get_flags (vnet_main_t *vnm, u32 sw_if_index)
 
static uword vnet_sw_interface_is_admin_up (vnet_main_t *vnm, u32 sw_if_index)
 
static uword vnet_swif_is_api_visible (vnet_sw_interface_t *si)
 
static uword vnet_sw_interface_is_api_visible (vnet_main_t *vnm, u32 sw_if_index)
 
static uword vnet_sw_interface_is_api_valid (vnet_main_t *vnm, u32 sw_if_index)
 
static uword vnet_hw_interface_get_flags (vnet_main_t *vnm, u32 hw_if_index)
 
static uword vnet_hw_interface_get_mtu (vnet_main_t *vnm, u32 hw_if_index, vlib_rx_or_tx_t dir)
 
static uword vnet_sw_interface_get_mtu (vnet_main_t *vnm, u32 sw_if_index, vlib_rx_or_tx_t dir)
 
static uword vnet_hw_interface_is_link_up (vnet_main_t *vnm, u32 hw_if_index)
 
static vlib_frame_tvnet_get_frame_to_sw_interface (vnet_main_t *vnm, u32 sw_if_index)
 
static void vnet_put_frame_to_sw_interface (vnet_main_t *vnm, u32 sw_if_index, vlib_frame_t *f)
 
clib_error_tvnet_hw_interface_set_flags (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
clib_error_tvnet_sw_interface_set_flags (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
clib_error_tvnet_hw_interface_set_class (vnet_main_t *vnm, u32 hw_if_index, u32 new_hw_class_index)
 
int vnet_hw_interface_rx_redirect_to_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
void vnet_hw_interface_init_for_class (vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index, u32 hw_instance)
 
clib_error_tvnet_rename_interface (vnet_main_t *vnm, u32 hw_if_index, char *new_name)
 
clib_error_tvnet_hw_interface_change_mac_address (vnet_main_t *vnm, u32 hw_if_index, u64 mac_address)
 
void * vnet_interface_output_node_multiarch_select (void)
 
void * vnet_interface_output_node_flatten_multiarch_select (void)
 
word vnet_sw_interface_compare (vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
 
word vnet_hw_interface_compare (vnet_main_t *vnm, uword hw_if_index0, uword hw_if_index1)
 
u8format_vnet_interface_output_trace (u8 *s, va_list *va)
 

Variables

format_function_t format_vnet_hw_interface
 
format_function_t format_vnet_hw_interface_rx_mode
 
format_function_t format_vnet_sw_interface
 
format_function_t format_vnet_sw_interface_name
 
format_function_t format_vnet_sw_interface_name_override
 
format_function_t format_vnet_sw_if_index_name
 
format_function_t format_vnet_sw_interface_flags
 
unformat_function_t unformat_vnet_sw_interface
 
unformat_function_t unformat_vnet_hw_interface
 
unformat_function_t unformat_vnet_hw_interface_flags
 
unformat_function_t unformat_vnet_sw_interface_flags
 
serialize_function_t serialize_vnet_interface_state
 
serialize_function_t unserialize_vnet_interface_state
 

Macro Definition Documentation

#define VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT   VNET_INTERFACE_TX_N_NEXT

Definition at line 325 of file interface_funcs.h.

Typedef Documentation

typedef void(* vnet_hw_sw_interface_walk_t) (vnet_main_t *vnm, u32 sw_if_index, void *ctx)

Call back walk type for walking SW indices on a HW interface.

Definition at line 144 of file interface_funcs.h.

Enumeration Type Documentation

Enumerator
VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DOWN 
VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DELETED 

Definition at line 327 of file interface_funcs.h.

Enumerator
VNET_INTERFACE_OUTPUT_NEXT_DROP 
VNET_INTERFACE_OUTPUT_NEXT_TX 

Definition at line 313 of file interface_funcs.h.

Enumerator
VNET_INTERFACE_TX_NEXT_DROP 
VNET_INTERFACE_TX_N_NEXT 

Definition at line 319 of file interface_funcs.h.

Function Documentation

u8* format_vnet_interface_output_trace ( u8 s,
va_list *  va 
)

Definition at line 51 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vnet_clear_sw_interface_tag ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 129 of file interface_funcs.h.

+ Here is the caller graph for this function:

clib_error_t* vnet_create_sw_interface ( vnet_main_t vnm,
vnet_sw_interface_t template,
u32 sw_if_index 
)

Definition at line 597 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_delete_hw_interface ( vnet_main_t vnm,
u32  hw_if_index 
)

Definition at line 897 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_delete_sw_interface ( vnet_main_t vnm,
u32  sw_if_index 
)

Definition at line 635 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_device_class_t* vnet_get_device_class ( vnet_main_t vnm,
u32  dev_class_index 
)
inlinestatic

Definition at line 97 of file interface_funcs.h.

+ Here is the caller graph for this function:

static vlib_frame_t* vnet_get_frame_to_sw_interface ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 236 of file interface_funcs.h.

+ Here is the call graph for this function:

static vnet_hw_interface_t* vnet_get_hw_interface ( vnet_main_t vnm,
u32  hw_if_index 
)
inlinestatic

Definition at line 44 of file interface_funcs.h.

static vnet_hw_interface_class_t* vnet_get_hw_interface_class ( vnet_main_t vnm,
u32  hw_class_index 
)
inlinestatic

Definition at line 90 of file interface_funcs.h.

+ Here is the caller graph for this function:

static vnet_sw_interface_t* vnet_get_hw_sw_interface ( vnet_main_t vnm,
u32  hw_if_index 
)
inlinestatic

Definition at line 64 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_hw_interface_t* vnet_get_sup_hw_interface ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 82 of file interface_funcs.h.

+ Here is the call graph for this function:

static vnet_sw_interface_t* vnet_get_sup_sw_interface ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 73 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vnet_sw_interface_t* vnet_get_sw_interface ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 50 of file interface_funcs.h.

static vnet_sw_interface_t* vnet_get_sw_interface_safe ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 56 of file interface_funcs.h.

+ Here is the caller graph for this function:

static u8* vnet_get_sw_interface_tag ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 104 of file interface_funcs.h.

+ Here is the caller graph for this function:

clib_error_t* vnet_hw_interface_change_mac_address ( vnet_main_t vnm,
u32  hw_if_index,
u64  mac_address 
)

Definition at line 1374 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

word vnet_hw_interface_compare ( vnet_main_t vnm,
uword  hw_if_index0,
uword  hw_if_index1 
)

Definition at line 1144 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_hw_interface_get_flags ( vnet_main_t vnm,
u32  hw_if_index 
)
inlinestatic

Definition at line 206 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_hw_interface_get_mtu ( vnet_main_t vnm,
u32  hw_if_index,
vlib_rx_or_tx_t  dir 
)
inlinestatic

Definition at line 213 of file interface_funcs.h.

+ Here is the call graph for this function:

void vnet_hw_interface_init_for_class ( vnet_main_t vnm,
u32  hw_if_index,
u32  hw_class_index,
u32  hw_instance 
)

Definition at line 1012 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_hw_interface_is_link_up ( vnet_main_t vnm,
u32  hw_if_index 
)
inlinestatic

Definition at line 229 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_hw_interface_rx_redirect_to_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)

Definition at line 1121 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_hw_interface_set_class ( vnet_main_t vnm,
u32  hw_if_index,
u32  new_hw_class_index 
)

Definition at line 1089 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 537 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_hw_interface_walk_sw ( vnet_main_t vnm,
u32  hw_if_index,
vnet_hw_sw_interface_walk_t  fn,
void *  ctx 
)

Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.

Definition at line 955 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* vnet_interface_output_node_flatten_multiarch_select ( void  )

+ Here is the caller graph for this function:

void* vnet_interface_output_node_multiarch_select ( void  )

+ Here is the caller graph for this function:

static void vnet_put_frame_to_sw_interface ( vnet_main_t vnm,
u32  sw_if_index,
vlib_frame_t f 
)
inlinestatic

Definition at line 243 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 vnet_register_interface ( vnet_main_t vnm,
u32  dev_class_index,
u32  dev_instance,
u32  hw_class_index,
u32  hw_instance 
)

Definition at line 688 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_rename_interface ( vnet_main_t vnm,
u32  hw_if_index,
char *  new_name 
)

Definition at line 1296 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vnet_set_sw_interface_tag ( vnet_main_t vnm,
u8 tag,
u32  sw_if_index 
)
inlinestatic

Definition at line 114 of file interface_funcs.h.

+ Here is the caller graph for this function:

word vnet_sw_interface_compare ( vnet_main_t vnm,
uword  sw_if_index0,
uword  sw_if_index1 
)

Definition at line 1130 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_sw_interface_get_flags ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 172 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_sw_interface_get_mtu ( vnet_main_t vnm,
u32  sw_if_index,
vlib_rx_or_tx_t  dir 
)
inlinestatic

Definition at line 221 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_sw_interface_is_admin_up ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 179 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_sw_interface_is_api_valid ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 199 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_sw_interface_is_api_visible ( vnet_main_t vnm,
u32  sw_if_index 
)
inlinestatic

Definition at line 192 of file interface_funcs.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_sw_interface_is_p2p ( vnet_main_t vnm,
u32  sw_if_index 
)

Definition at line 1156 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_sw_interface_set_flags ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)

Definition at line 545 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_swif_is_api_visible ( vnet_sw_interface_t si)
inlinestatic

Definition at line 186 of file interface_funcs.h.

+ Here is the caller graph for this function:

Variable Documentation

format_function_t format_vnet_hw_interface

Definition at line 279 of file interface_funcs.h.

format_function_t format_vnet_hw_interface_rx_mode

Definition at line 280 of file interface_funcs.h.

format_function_t format_vnet_sw_if_index_name

Definition at line 284 of file interface_funcs.h.

format_function_t format_vnet_sw_interface

Definition at line 281 of file interface_funcs.h.

format_function_t format_vnet_sw_interface_flags

Definition at line 285 of file interface_funcs.h.

format_function_t format_vnet_sw_interface_name

Definition at line 282 of file interface_funcs.h.

format_function_t format_vnet_sw_interface_name_override

Definition at line 283 of file interface_funcs.h.

serialize_function_t serialize_vnet_interface_state

Definition at line 336 of file interface_funcs.h.

unformat_function_t unformat_vnet_hw_interface

Definition at line 289 of file interface_funcs.h.

unformat_function_t unformat_vnet_hw_interface_flags

Definition at line 292 of file interface_funcs.h.

unformat_function_t unformat_vnet_sw_interface

Definition at line 288 of file interface_funcs.h.

unformat_function_t unformat_vnet_sw_interface_flags

Definition at line 293 of file interface_funcs.h.

serialize_function_t unserialize_vnet_interface_state

Definition at line 336 of file interface_funcs.h.