FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
interface.h File Reference
+ Include dependency graph for interface.h:

Go to the source code of this file.

Data Structures

struct  vnet_hw_interface_t
 
struct  vnet_sub_interface_t
 
struct  vnet_p2p_sub_interface_t
 
struct  vnet_sw_interface_t
 
struct  vnet_hw_interface_nodes_t
 
struct  vnet_interface_per_thread_data_t
 
struct  vnet_interface_main_t
 
struct  vnet_pcap_dispatch_trace_args_t
 

Macros

#define VNET_ITF_FUNC_N_PRIO   ((vnet_interface_function_priority_t)VNET_ITF_FUNC_PRIORITY_HIGH+1)
 
#define VNET_HW_INTERFACE_ADD_DEL_FUNCTION(f)   _VNET_INTERFACE_FUNCTION_DECL(f,hw_interface_add_del)
 
#define VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(f)   _VNET_INTERFACE_FUNCTION_DECL(f,hw_interface_link_up_down)
 
#define VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION_PRIO(f, p)   _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,hw_interface_link_up_down,p)
 
#define VNET_SW_INTERFACE_MTU_CHANGE_FUNCTION(f)   _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_mtu_change)
 
#define VNET_SW_INTERFACE_ADD_DEL_FUNCTION(f)   _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_add_del)
 
#define VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(f)   _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_admin_up_down)
 
#define VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION_PRIO(f, p)   _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,sw_interface_admin_up_down, p)
 
#define VNET_DEVICE_CLASS(x, ...)
 
#define VNET_DEVICE_CLASS_TX_FN(devclass)
 
#define VNET_LINKS
 
#define FOR_EACH_VNET_LINK(_link)
 
#define VNET_LINK_NUM   (VNET_LINK_NSH+1)
 Number of link types. More...
 
#define VNET_HW_INTERFACE_CLASS(x, ...)
 
#define VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT   1
 
#define VNET_HW_INTERFACE_FLAG_SPEED_SHIFT   3
 
#define VNET_HW_INTERFACE_FLAG_DUPLEX_MASK
 
#define VNET_HW_INTERFACE_BOND_INFO_NONE   ((uword *) 0)
 
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE   ((uword *) ~0)
 
#define foreach_rx_combined_interface_counter(_x)
 
#define foreach_tx_combined_interface_counter(_x)
 
#define foreach_simple_interface_counter_name
 
#define foreach_combined_interface_counter_name
 

Typedefs

typedef clib_error_t *() vnet_interface_function_t(struct vnet_main_t *vnm, u32 if_index, u32 flags)
 
typedef clib_error_t *() vnet_subif_add_del_function_t(struct vnet_main_t *vnm, u32 if_index, struct vnet_sw_interface_t *template, int is_add)
 
typedef clib_error_t *() vnet_interface_set_mac_address_function_t(struct vnet_hw_interface_t *hi, const u8 *old_address, const u8 *new_address)
 
typedef clib_error_t *() vnet_interface_set_rx_mode_function_t(struct vnet_main_t *vnm, u32 if_index, u32 queue_id, vnet_hw_interface_rx_mode mode)
 
typedef clib_error_t *() vnet_interface_set_l2_mode_function_t(struct vnet_main_t *vnm, struct vnet_hw_interface_t *hi, i32 l2_if_adjust)
 
typedef int() vnet_flow_dev_ops_function_t(struct vnet_main_t *vnm, vnet_flow_dev_op_t op, u32 hw_if_index, u32 index, uword *private_data)
 
typedef enum vnet_interface_function_priority_t_ vnet_interface_function_priority_t
 
typedef int(* vnet_dev_class_ip_tunnel_desc_t) (u32 sw_if_index, union ip46_address_t_ *src, union ip46_address_t_ *dst, u8 *is_l2)
 Tunnel description parameters. More...
 
typedef struct _vnet_device_class vnet_device_class_t
 
typedef enum vnet_link_t_ vnet_link_t
 Link Type: A description of the protocol of packets on the link. More...
 
typedef enum vnet_hw_interface_class_flags_t_ vnet_hw_interface_class_flags_t
 Attributes assignable to a HW interface Class. More...
 
typedef struct _vnet_hw_interface_class vnet_hw_interface_class_t
 
typedef enum vnet_hw_interface_flags_t_ vnet_hw_interface_flags_t
 
typedef struct vnet_hw_interface_t vnet_hw_interface_t
 
typedef enum vnet_sw_interface_flags_t_ vnet_sw_interface_flags_t
 
typedef u8 *(* vnet_buffer_opquae_formatter_t) (const vlib_buffer_t *b, u8 *s)
 

Enumerations

enum  vnet_hw_interface_rx_mode {
  VNET_HW_INTERFACE_RX_MODE_UNKNOWN, VNET_HW_INTERFACE_RX_MODE_POLLING, VNET_HW_INTERFACE_RX_MODE_INTERRUPT, VNET_HW_INTERFACE_RX_MODE_ADAPTIVE,
  VNET_HW_INTERFACE_RX_MODE_DEFAULT, VNET_HW_INTERFACE_NUM_RX_MODES
}
 
enum  vnet_flow_dev_op_t { VNET_FLOW_DEV_OP_ADD_FLOW, VNET_FLOW_DEV_OP_DEL_FLOW, VNET_FLOW_DEV_OP_GET_COUNTER, VNET_FLOW_DEV_OP_RESET_COUNTER }
 
enum  vnet_interface_function_priority_t_ { VNET_ITF_FUNC_PRIORITY_LOW, VNET_ITF_FUNC_PRIORITY_HIGH }
 
enum  vnet_link_t_ {
  VNET_LINK_IP4 = 1, VNET_LINK_IP6, VNET_LINK_MPLS, VNET_LINK_ETHERNET,
  VNET_LINK_ARP, VNET_LINK_NSH
}
 Link Type: A description of the protocol of packets on the link. More...
 
enum  vnet_hw_interface_class_flags_t_ { VNET_HW_INTERFACE_CLASS_FLAG_P2P = (1 << 0) }
 Attributes assignable to a HW interface Class. More...
 
enum  vnet_hw_interface_flags_t_ {
  VNET_HW_INTERFACE_FLAG_NONE, VNET_HW_INTERFACE_FLAG_LINK_UP = (1 << 0), VNET_HW_INTERFACE_FLAG_HALF_DUPLEX = (1 << 1), VNET_HW_INTERFACE_FLAG_FULL_DUPLEX = (1 << 2),
  VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE = (1 << 16), VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD = (1 << 17), VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO = (1 << 18)
}
 
enum  vnet_sw_interface_type_t { VNET_SW_INTERFACE_TYPE_HARDWARE, VNET_SW_INTERFACE_TYPE_SUB, VNET_SW_INTERFACE_TYPE_P2P, VNET_SW_INTERFACE_TYPE_PIPE }
 
enum  vnet_flood_class_t {
  VNET_FLOOD_CLASS_BVI, VNET_FLOOD_CLASS_NORMAL, VNET_FLOOD_CLASS_TUNNEL_MASTER, VNET_FLOOD_CLASS_TUNNEL_NORMAL,
  VNET_FLOOD_CLASS_NO_FLOOD
}
 
enum  vnet_mtu_t {
  VNET_MTU_L3, VNET_MTU_IP4, VNET_MTU_IP6, VNET_MTU_MPLS,
  VNET_N_MTU
}
 
enum  vnet_sw_interface_flags_t_ {
  VNET_SW_INTERFACE_FLAG_NONE = 0, VNET_SW_INTERFACE_FLAG_ADMIN_UP = (1 << 0), VNET_SW_INTERFACE_FLAG_PUNT = (1 << 1) , VNET_SW_INTERFACE_FLAG_UNNUMBERED = (1 << 3) ,
  VNET_SW_INTERFACE_FLAG_HIDDEN = (1 << 5), VNET_SW_INTERFACE_FLAG_ERROR = (1 << 6), VNET_SW_INTERFACE_FLAG_DIRECTED_BCAST = (1 << 7)
}
 
enum  vnet_interface_counter_type_t {
  VNET_INTERFACE_COUNTER_DROP = 0, VNET_INTERFACE_COUNTER_PUNT = 1, VNET_INTERFACE_COUNTER_IP4 = 2, VNET_INTERFACE_COUNTER_IP6 = 3,
  VNET_INTERFACE_COUNTER_RX_NO_BUF = 4, VNET_INTERFACE_COUNTER_RX_MISS = 5, VNET_INTERFACE_COUNTER_RX_ERROR = 6, VNET_INTERFACE_COUNTER_TX_ERROR = 7,
  VNET_INTERFACE_COUNTER_MPLS = 8, VNET_N_SIMPLE_INTERFACE_COUNTER = 9, VNET_INTERFACE_COUNTER_RX = 0, VNET_INTERFACE_COUNTER_RX_UNICAST = 1,
  VNET_INTERFACE_COUNTER_RX_MULTICAST = 2, VNET_INTERFACE_COUNTER_RX_BROADCAST = 3, VNET_INTERFACE_COUNTER_TX = 4, VNET_INTERFACE_COUNTER_TX_UNICAST = 5,
  VNET_INTERFACE_COUNTER_TX_MULTICAST = 6, VNET_INTERFACE_COUNTER_TX_BROADCAST = 7, VNET_N_COMBINED_INTERFACE_COUNTER = 8
}
 
enum  vnet_interface_stats_collection_mode_e { COLLECT_SIMPLE_STATS = 0, COLLECT_DETAILED_STATS = 1 }
 

Functions

vnet_l3_packet_type_t vnet_link_to_l3_proto (vnet_link_t link)
 Convert a link to to an Ethertype. More...
 
u8default_build_rewrite (struct vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_hw_address)
 Return a complete, zero-length (aka dummy) rewrite. More...
 
void default_update_adjacency (struct vnet_main_t *vnm, u32 sw_if_index, u32 adj_index)
 Default adjacency update function. More...
 
vnet_mtu_t vnet_link_to_mtu (vnet_link_t link)
 
static int collect_detailed_interface_stats (void)
 
void collect_detailed_interface_stats_flag_set (void)
 
void collect_detailed_interface_stats_flag_clear (void)
 
static void vnet_interface_counter_lock (vnet_interface_main_t *im)
 
static void vnet_interface_counter_unlock (vnet_interface_main_t *im)
 
void vnet_pcap_drop_trace_filter_add_del (u32 error_index, int is_add)
 
int vnet_interface_name_renumber (u32 sw_if_index, u32 new_show_dev_instance)
 
uword vnet_interface_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void vnet_register_format_buffer_opaque_helper (vnet_buffer_opquae_formatter_t fn)
 
void vnet_register_format_buffer_opaque2_helper (vnet_buffer_opquae_formatter_t fn)
 
int vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t *)
 

Variables

vnet_device_class_t vnet_local_interface_device_class
 
int collect_detailed_interface_stats_flag
 

Macro Definition Documentation

◆ FOR_EACH_VNET_LINK

#define FOR_EACH_VNET_LINK (   _link)
Value:
for (_link = VNET_LINK_IP4; \
_link <= VNET_LINK_NSH; \
_link++)

Definition at line 344 of file interface.h.

◆ foreach_combined_interface_counter_name

#define foreach_combined_interface_counter_name
Value:
_(RX, rx, if) \
_(RX_UNICAST, rx-unicast, if) \
_(RX_MULTICAST, rx-multicast, if) \
_(RX_BROADCAST, rx-broadcast, if) \
_(TX, tx, if) \
_(TX_UNICAST, tx-unicast, if) \
_(TX_MULTICAST, tx-multicast, if) \
_(TX_BROADCAST, tx-broadcast, if)

Definition at line 777 of file interface.h.

◆ foreach_rx_combined_interface_counter

#define foreach_rx_combined_interface_counter (   _x)

◆ foreach_simple_interface_counter_name

#define foreach_simple_interface_counter_name
Value:
_(DROP, drops, if) \
_(PUNT, punt, if) \
_(IP4, ip4, if) \
_(IP6, ip6, if) \
_(RX_NO_BUF, rx-no-buf, if) \
_(RX_MISS, rx-miss, if) \
_(RX_ERROR, rx-error, if) \
_(TX_ERROR, tx-error, if) \
_(MPLS, mpls, if)
typedef punt
Full description of which packets are requested to be punted.
Definition: punt.api:75
Definition: acl.h:67
Definition: acl.h:67
DROP
Definition: error.def:41

Definition at line 766 of file interface.h.

◆ foreach_tx_combined_interface_counter

#define foreach_tx_combined_interface_counter (   _x)

◆ VNET_DEVICE_CLASS

#define VNET_DEVICE_CLASS (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_device_class_t x; \
static void __vnet_add_device_class_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_device_class_registration_##x (void) \
{ \
vnet_main_t * vnm = vnet_get_main(); \
x.next_class_registration = vnm->device_class_registrations; \
vnm->device_class_registrations = &x; \
} \
static void __vnet_rm_device_class_registration_##x (void) \
__attribute__((__destructor__)) ; \
static void __vnet_rm_device_class_registration_##x (void) \
{ \
vnet_main_t * vnm = vnet_get_main(); \
VLIB_REMOVE_FROM_LINKED_LIST (vnm->device_class_registrations, \
&x, next_class_registration); \
} \
__VA_ARGS__ vnet_device_class_t x
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
struct _vnet_device_class vnet_device_class_t

Definition at line 272 of file interface.h.

◆ VNET_DEVICE_CLASS_TX_FN

#define VNET_DEVICE_CLASS_TX_FN (   devclass)
Value:
uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \
CLIB_MARCH_SFX(devclass##_tx_fn_registration) = \
{ .function = &CLIB_MARCH_SFX (devclass##_tx_fn), }; \
\
CLIB_MARCH_SFX (devclass##_tx_fn_multiarch_register) (void) \
{ \
extern vnet_device_class_t devclass; \
vlib_node_fn_registration_t *r; \
r = &CLIB_MARCH_SFX (devclass##_tx_fn_registration); \
r->priority = CLIB_MARCH_FN_PRIORITY(); \
r->next_registration = devclass.tx_fn_registrations; \
devclass.tx_fn_registrations = r; \
} \
uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (devclass##_tx_fn)
struct _vnet_device_class vnet_device_class_t
#define CLIB_CPU_OPTIMIZED
Definition: cpu.h:40
#define CLIB_MARCH_SFX
Definition: cpu.h:59
u64 uword
Definition: types.h:112
#define CLIB_MARCH_FN_PRIORITY()
Definition: cpu.h:356

Definition at line 298 of file interface.h.

◆ VNET_HW_INTERFACE_ADD_DEL_FUNCTION

#define VNET_HW_INTERFACE_ADD_DEL_FUNCTION (   f)    _VNET_INTERFACE_FUNCTION_DECL(f,hw_interface_add_del)

Definition at line 163 of file interface.h.

◆ VNET_HW_INTERFACE_BOND_INFO_NONE

#define VNET_HW_INTERFACE_BOND_INFO_NONE   ((uword *) 0)

Definition at line 564 of file interface.h.

◆ VNET_HW_INTERFACE_BOND_INFO_SLAVE

#define VNET_HW_INTERFACE_BOND_INFO_SLAVE   ((uword *) ~0)

Definition at line 565 of file interface.h.

◆ VNET_HW_INTERFACE_CLASS

#define VNET_HW_INTERFACE_CLASS (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_hw_interface_class_t x; \
static void __vnet_add_hw_interface_class_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_hw_interface_class_registration_##x (void) \
{ \
vnet_main_t * vnm = vnet_get_main(); \
x.next_class_registration = vnm->hw_interface_class_registrations; \
vnm->hw_interface_class_registrations = &x; \
} \
static void __vnet_rm_hw_interface_class_registration_##x (void) \
__attribute__((__destructor__)) ; \
static void __vnet_rm_hw_interface_class_registration_##x (void) \
{ \
vnet_main_t * vnm = vnet_get_main(); \
VLIB_REMOVE_FROM_LINKED_LIST (vnm->hw_interface_class_registrations,\
&x, next_class_registration); \
} \
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
struct _vnet_hw_interface_class vnet_hw_interface_class_t

Definition at line 452 of file interface.h.

◆ VNET_HW_INTERFACE_FLAG_DUPLEX_MASK

#define VNET_HW_INTERFACE_FLAG_DUPLEX_MASK
Value:

Definition at line 493 of file interface.h.

◆ VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT

#define VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT   1

Definition at line 491 of file interface.h.

◆ VNET_HW_INTERFACE_FLAG_SPEED_SHIFT

#define VNET_HW_INTERFACE_FLAG_SPEED_SHIFT   3

Definition at line 492 of file interface.h.

◆ VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION

#define VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (   f)    _VNET_INTERFACE_FUNCTION_DECL(f,hw_interface_link_up_down)

Definition at line 165 of file interface.h.

◆ VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION_PRIO

#define VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION_PRIO (   f,
 
)    _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,hw_interface_link_up_down,p)

Definition at line 167 of file interface.h.

◆ VNET_ITF_FUNC_N_PRIO

#define VNET_ITF_FUNC_N_PRIO   ((vnet_interface_function_priority_t)VNET_ITF_FUNC_PRIORITY_HIGH+1)

Definition at line 106 of file interface.h.

◆ VNET_LINK_NUM

#define VNET_LINK_NUM   (VNET_LINK_NSH+1)

Number of link types.

Not part of the enum so it does not have to be included in switch statements

Definition at line 353 of file interface.h.

◆ VNET_LINKS

#define VNET_LINKS
Value:
{ \
[VNET_LINK_ETHERNET] = "ethernet", \
[VNET_LINK_IP4] = "ipv4", \
[VNET_LINK_IP6] = "ipv6", \
[VNET_LINK_MPLS] = "mpls", \
[VNET_LINK_ARP] = "arp", \
[VNET_LINK_NSH] = "nsh", \
}

Definition at line 335 of file interface.h.

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION

#define VNET_SW_INTERFACE_ADD_DEL_FUNCTION (   f)    _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_add_del)

Definition at line 171 of file interface.h.

◆ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION

#define VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (   f)    _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_admin_up_down)

Definition at line 173 of file interface.h.

◆ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION_PRIO

#define VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION_PRIO (   f,
 
)    _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,sw_interface_admin_up_down, p)

Definition at line 175 of file interface.h.

◆ VNET_SW_INTERFACE_MTU_CHANGE_FUNCTION

#define VNET_SW_INTERFACE_MTU_CHANGE_FUNCTION (   f)    _VNET_INTERFACE_FUNCTION_DECL(f,sw_interface_mtu_change)

Definition at line 169 of file interface.h.

Typedef Documentation

◆ vnet_buffer_opquae_formatter_t

typedef u8*(* vnet_buffer_opquae_formatter_t) (const vlib_buffer_t *b, u8 *s)

Definition at line 817 of file interface.h.

◆ vnet_dev_class_ip_tunnel_desc_t

typedef int(* vnet_dev_class_ip_tunnel_desc_t) (u32 sw_if_index, union ip46_address_t_ *src, union ip46_address_t_ *dst, u8 *is_l2)

Tunnel description parameters.

Definition at line 181 of file interface.h.

◆ vnet_device_class_t

typedef struct _vnet_device_class vnet_device_class_t

◆ vnet_flow_dev_ops_function_t

typedef int() vnet_flow_dev_ops_function_t(struct vnet_main_t *vnm, vnet_flow_dev_op_t op, u32 hw_if_index, u32 index, uword *private_data)

Definition at line 96 of file interface.h.

◆ vnet_hw_interface_class_flags_t

Attributes assignable to a HW interface Class.

◆ vnet_hw_interface_class_t

typedef struct _vnet_hw_interface_class vnet_hw_interface_class_t

◆ vnet_hw_interface_flags_t

◆ vnet_hw_interface_t

◆ vnet_interface_function_priority_t

◆ vnet_interface_function_t

typedef clib_error_t*() vnet_interface_function_t(struct vnet_main_t *vnm, u32 if_index, u32 flags)

Definition at line 65 of file interface.h.

◆ vnet_interface_set_l2_mode_function_t

typedef clib_error_t*() vnet_interface_set_l2_mode_function_t(struct vnet_main_t *vnm, struct vnet_hw_interface_t *hi, i32 l2_if_adjust)

Definition at line 84 of file interface.h.

◆ vnet_interface_set_mac_address_function_t

typedef clib_error_t*() vnet_interface_set_mac_address_function_t(struct vnet_hw_interface_t *hi, const u8 *old_address, const u8 *new_address)

Definition at line 74 of file interface.h.

◆ vnet_interface_set_rx_mode_function_t

typedef clib_error_t*() vnet_interface_set_rx_mode_function_t(struct vnet_main_t *vnm, u32 if_index, u32 queue_id, vnet_hw_interface_rx_mode mode)

Definition at line 79 of file interface.h.

◆ vnet_link_t

typedef enum vnet_link_t_ vnet_link_t

Link Type: A description of the protocol of packets on the link.

On an ethernet link this maps directly into the ethertype. On a GRE tunnel it maps to the GRE-proto, etc for other lnk types.

◆ vnet_subif_add_del_function_t

typedef clib_error_t*() vnet_subif_add_del_function_t(struct vnet_main_t *vnm, u32 if_index, struct vnet_sw_interface_t *template, int is_add)

Definition at line 69 of file interface.h.

◆ vnet_sw_interface_flags_t

Enumeration Type Documentation

◆ vnet_flood_class_t

Enumerator
VNET_FLOOD_CLASS_BVI 
VNET_FLOOD_CLASS_NORMAL 
VNET_FLOOD_CLASS_TUNNEL_MASTER 
VNET_FLOOD_CLASS_TUNNEL_NORMAL 
VNET_FLOOD_CLASS_NO_FLOOD 

Definition at line 644 of file interface.h.

◆ vnet_flow_dev_op_t

Enumerator
VNET_FLOW_DEV_OP_ADD_FLOW 
VNET_FLOW_DEV_OP_DEL_FLOW 
VNET_FLOW_DEV_OP_GET_COUNTER 
VNET_FLOW_DEV_OP_RESET_COUNTER 

Definition at line 87 of file interface.h.

◆ vnet_hw_interface_class_flags_t_

Attributes assignable to a HW interface Class.

Enumerator
VNET_HW_INTERFACE_CLASS_FLAG_P2P 

a point 2 point interface

Definition at line 363 of file interface.h.

◆ vnet_hw_interface_flags_t_

Enumerator
VNET_HW_INTERFACE_FLAG_NONE 
VNET_HW_INTERFACE_FLAG_LINK_UP 
VNET_HW_INTERFACE_FLAG_HALF_DUPLEX 
VNET_HW_INTERFACE_FLAG_FULL_DUPLEX 
VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE 
VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD 
VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO 

Definition at line 472 of file interface.h.

◆ vnet_hw_interface_rx_mode

Enumerator
VNET_HW_INTERFACE_RX_MODE_UNKNOWN 
VNET_HW_INTERFACE_RX_MODE_POLLING 
VNET_HW_INTERFACE_RX_MODE_INTERRUPT 
VNET_HW_INTERFACE_RX_MODE_ADAPTIVE 
VNET_HW_INTERFACE_RX_MODE_DEFAULT 
VNET_HW_INTERFACE_NUM_RX_MODES 

Definition at line 53 of file interface.h.

◆ vnet_interface_counter_type_t

Enumerator
VNET_INTERFACE_COUNTER_DROP 
VNET_INTERFACE_COUNTER_PUNT 
VNET_INTERFACE_COUNTER_IP4 
VNET_INTERFACE_COUNTER_IP6 
VNET_INTERFACE_COUNTER_RX_NO_BUF 
VNET_INTERFACE_COUNTER_RX_MISS 
VNET_INTERFACE_COUNTER_RX_ERROR 
VNET_INTERFACE_COUNTER_TX_ERROR 
VNET_INTERFACE_COUNTER_MPLS 
VNET_N_SIMPLE_INTERFACE_COUNTER 
VNET_INTERFACE_COUNTER_RX 
VNET_INTERFACE_COUNTER_RX_UNICAST 
VNET_INTERFACE_COUNTER_RX_MULTICAST 
VNET_INTERFACE_COUNTER_RX_BROADCAST 
VNET_INTERFACE_COUNTER_TX 
VNET_INTERFACE_COUNTER_TX_UNICAST 
VNET_INTERFACE_COUNTER_TX_MULTICAST 
VNET_INTERFACE_COUNTER_TX_BROADCAST 
VNET_N_COMBINED_INTERFACE_COUNTER 

Definition at line 731 of file interface.h.

◆ vnet_interface_function_priority_t_

Enumerator
VNET_ITF_FUNC_PRIORITY_LOW 
VNET_ITF_FUNC_PRIORITY_HIGH 

Definition at line 101 of file interface.h.

◆ vnet_interface_stats_collection_mode_e

Enumerator
COLLECT_SIMPLE_STATS 
COLLECT_DETAILED_STATS 

Definition at line 787 of file interface.h.

◆ vnet_link_t_

Link Type: A description of the protocol of packets on the link.

On an ethernet link this maps directly into the ethertype. On a GRE tunnel it maps to the GRE-proto, etc for other lnk types.

Enumerator
VNET_LINK_IP4 
VNET_LINK_IP6 
VNET_LINK_MPLS 
VNET_LINK_ETHERNET 
VNET_LINK_ARP 
VNET_LINK_NSH 

Definition at line 321 of file interface.h.

◆ vnet_mtu_t

enum vnet_mtu_t
Enumerator
VNET_MTU_L3 
VNET_MTU_IP4 
VNET_MTU_IP6 
VNET_MTU_MPLS 
VNET_N_MTU 

Definition at line 658 of file interface.h.

◆ vnet_sw_interface_flags_t_

Enumerator
VNET_SW_INTERFACE_FLAG_NONE 
VNET_SW_INTERFACE_FLAG_ADMIN_UP 
VNET_SW_INTERFACE_FLAG_PUNT 
VNET_SW_INTERFACE_FLAG_UNNUMBERED 
VNET_SW_INTERFACE_FLAG_HIDDEN 
VNET_SW_INTERFACE_FLAG_ERROR 
VNET_SW_INTERFACE_FLAG_DIRECTED_BCAST 

Definition at line 669 of file interface.h.

◆ vnet_sw_interface_type_t

Enumerator
VNET_SW_INTERFACE_TYPE_HARDWARE 
VNET_SW_INTERFACE_TYPE_SUB 
VNET_SW_INTERFACE_TYPE_P2P 
VNET_SW_INTERFACE_TYPE_PIPE 

Definition at line 591 of file interface.h.

Function Documentation

◆ collect_detailed_interface_stats()

static int collect_detailed_interface_stats ( void  )
inlinestatic

Definition at line 796 of file interface.h.

+ Here is the call graph for this function:

◆ collect_detailed_interface_stats_flag_clear()

void collect_detailed_interface_stats_flag_clear ( void  )

Definition at line 1643 of file interface.c.

+ Here is the caller graph for this function:

◆ collect_detailed_interface_stats_flag_set()

void collect_detailed_interface_stats_flag_set ( void  )

Definition at line 1637 of file interface.c.

+ Here is the caller graph for this function:

◆ default_build_rewrite()

u8* default_build_rewrite ( struct vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_hw_address 
)

Return a complete, zero-length (aka dummy) rewrite.

Definition at line 1578 of file interface.c.

+ Here is the caller graph for this function:

◆ default_update_adjacency()

void default_update_adjacency ( struct vnet_main_t vnm,
u32  sw_if_index,
u32  adj_index 
)

Default adjacency update function.

Definition at line 1586 of file interface.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_interface_counter_lock()

static void vnet_interface_counter_lock ( vnet_interface_main_t im)
inlinestatic

Definition at line 872 of file interface.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_interface_counter_unlock()

static void vnet_interface_counter_unlock ( vnet_interface_main_t im)
inlinestatic

Definition at line 879 of file interface.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_interface_name_renumber()

int vnet_interface_name_renumber ( u32  sw_if_index,
u32  new_show_dev_instance 
)

Definition at line 1376 of file interface.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_interface_output_node()

uword vnet_interface_output_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 881 of file interface_output.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_link_to_l3_proto()

vnet_l3_packet_type_t vnet_link_to_l3_proto ( vnet_link_t  link)

Convert a link to to an Ethertype.

Definition at line 1540 of file interface.c.

+ Here is the caller graph for this function:

◆ vnet_link_to_mtu()

vnet_mtu_t vnet_link_to_mtu ( vnet_link_t  link)

Definition at line 1562 of file interface.c.

+ Here is the caller graph for this function:

◆ vnet_pcap_dispatch_trace_configure()

int vnet_pcap_dispatch_trace_configure ( vnet_pcap_dispatch_trace_args_t )

Definition at line 1748 of file interface_cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_pcap_drop_trace_filter_add_del()

void vnet_pcap_drop_trace_filter_add_del ( u32  error_index,
int  is_add 
)

Definition at line 1302 of file interface_output.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_register_format_buffer_opaque2_helper()

void vnet_register_format_buffer_opaque2_helper ( vnet_buffer_opquae_formatter_t  fn)

Definition at line 608 of file interface_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_register_format_buffer_opaque_helper()

void vnet_register_format_buffer_opaque_helper ( vnet_buffer_opquae_formatter_t  fn)

Definition at line 601 of file interface_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ collect_detailed_interface_stats_flag

int collect_detailed_interface_stats_flag

Definition at line 1634 of file interface.c.

◆ vnet_local_interface_device_class

vnet_device_class_t vnet_local_interface_device_class