|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_vnet_interface_funcs_h
41 #define included_vnet_interface_funcs_h
136 return ((
u8 *) p[0]);
147 u8 *oldtag = (
u8 *) p[0];
162 u8 *oldtag = (
u8 *) p[0];
211 u32 hw_if_index,
void *
ctx);
224 u32 hw_class_index,
u32 hw_instance);
392 u32 new_hw_class_index);
399 u32 hw_class_index,
u32 hw_instance);
501 #define VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT VNET_INTERFACE_TX_N_NEXT
502 #define VNET_SIMULATED_ETHERNET_TX_NEXT_L2_INPUT (VNET_SIMULATED_ETHERNET_TX_NEXT_ETHERNET_INPUT + 1)
527 u32 n_bytes_in_trace)
u32 next_buffer
Next buffer for this linked-list of buffers.
static uword vnet_sw_interface_is_link_up(vnet_main_t *vnm, u32 sw_if_index)
clib_error_t * vnet_hw_interface_set_class(vnet_main_t *vnm, u32 hw_if_index, u32 new_hw_class_index)
@ VNET_SW_INTERFACE_TYPE_PIPE
#define hash_set(h, key, value)
walk_rc_t_
Walk return code.
vnet_sw_interface_type_t type
walk_rc_t(* vnet_hw_interface_walk_t)(vnet_main_t *vnm, u32 hw_if_index, void *ctx)
Call back walk type for walking all HW indices.
serialize_function_t unserialize_vnet_interface_state
struct _vnet_device_class vnet_device_class_t
u8 * format_vnet_interface_output_trace(u8 *s, va_list *va)
void vnet_sw_interface_set_protocol_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu[])
@ VNET_INTERFACE_TX_N_NEXT
static void * pcap_add_packet(pcap_main_t *pm, f64 time_now, u32 n_bytes_in_trace, u32 n_bytes_in_packet)
Add packet.
enum vnet_hw_interface_flags_t_ vnet_hw_interface_flags_t
static_always_inline void clib_spinlock_lock_if_init(clib_spinlock_t *p)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
void vnet_hw_interface_init_for_class(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index, u32 hw_instance)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
enum vnet_sw_interface_flags_t_ vnet_sw_interface_flags_t
static vnet_sw_interface_t * vnet_get_sw_interface_or_null(vnet_main_t *vnm, u32 sw_if_index)
walk_rc_t(* vnet_sw_interface_walk_t)(vnet_main_t *vnm, vnet_sw_interface_t *si, void *ctx)
Call back walk type for walking SW indices on a HW interface.
int vnet_hw_interface_rx_redirect_to_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
vnet_hw_interface_flags_t flags
void() serialize_function_t(serialize_main_t *m, va_list *va)
@ VNET_SW_INTERFACE_TYPE_SUB
void vnet_sw_interface_ip_directed_broadcast(vnet_main_t *vnm, u32 sw_if_index, u8 enable)
static uword vnet_swif_is_api_visible(vnet_sw_interface_t *si)
@ VNET_INTERFACE_OUTPUT_NEXT_TX
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, vnet_sw_interface_flags_t flags)
vl_api_tunnel_mode_t mode
static uword vnet_sw_interface_is_api_visible(vnet_main_t *vnm, u32 sw_if_index)
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
@ VNET_HW_INTERFACE_FLAG_LINK_UP
static vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
static void vnet_hw_interface_set_link_speed(vnet_main_t *vnm, u32 hw_if_index, u32 link_speed)
vnet_hw_interface_t * hw_interfaces
PCAP main state data structure.
static void pcap_add_buffer(pcap_main_t *pm, struct vlib_main_t *vm, u32 buffer_index, u32 n_bytes_in_trace)
Add buffer (vlib_buffer_t) to the trace.
clib_error_t * set_hw_interface_rx_placement(u32 hw_if_index, u32 queue_id, u32 thread_index, u8 is_main)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
void vnet_sw_interface_admin_up(vnet_main_t *vnm, u32 sw_if_index)
static uword vnet_sw_interface_is_valid(vnet_main_t *vnm, u32 sw_if_index)
#define hash_unset(h, key)
vnet_sw_interface_flags_t flags
clib_spinlock_t lock
spinlock to protect e.g.
static vnet_hw_interface_class_t * vnet_get_hw_interface_class(vnet_main_t *vnm, u32 hw_class_index)
static uword vnet_sw_interface_is_api_valid(vnet_main_t *vnm, u32 sw_if_index)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static u8 * vnet_get_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
void vnet_set_interface_output_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
Set interface output node - for interface registered without its output/tx nodes created because its ...
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
format_function_t format_vnet_hw_if_rx_mode
static vnet_sw_interface_flags_t vnet_sw_interface_get_flags(vnet_main_t *vnm, u32 sw_if_index)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
@ VNET_INTERFACE_TX_NEXT_DROP
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
static vnet_hw_interface_t * vnet_get_sup_hw_interface_api_visible_or_null(vnet_main_t *vnm, u32 sw_if_index)
static vlib_frame_t * vnet_get_frame_to_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
void vnet_sw_interface_set_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu)
int vnet_sw_interface_update_unnumbered(u32 sw_if_index, u32 ip_sw_if_index, u8 enable)
format_function_t format_vnet_hw_if_index_name
static uword vnet_sw_interface_is_sub(vnet_main_t *vnm, u32 sw_if_index)
void vnet_delete_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
static const u8 * vnet_sw_interface_get_hw_address(vnet_main_t *vnm, u32 sw_if_index)
void vnet_sw_interface_walk(vnet_main_t *vnm, vnet_sw_interface_walk_t fn, void *ctx)
Walk all the SW interfaces in the system.
static uword vnet_hw_interface_is_valid(vnet_main_t *vnm, u32 hw_if_index)
vnet_hw_interface_class_t * hw_interface_classes
static void vnet_set_sw_interface_tag(vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
format_function_t format_vnet_sw_interface_flags
@ VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DOWN
serialize_function_t serialize_vnet_interface_state
word vnet_hw_interface_compare(vnet_main_t *vnm, uword hw_if_index0, uword hw_if_index1)
vnet_device_class_t * device_classes
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
format_function_t format_vnet_hw_interface
unformat_function_t unformat_vnet_hw_interface
clib_error_t * vnet_hw_interface_change_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address)
vnet_sw_interface_t * sw_interfaces
u16 current_length
Nbytes between current data and the end of this buffer.
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
clib_error_t * vnet_hw_interface_add_del_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address, u8 is_add)
unformat_function_t unformat_vnet_buffer_offload_flags
int vnet_sw_interface_is_nbma(vnet_main_t *vnm, u32 sw_if_index)
#define vec_free(V)
Free vector's memory (no header).
int vnet_sw_interface_is_p2p(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.
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
clib_error_t * vnet_hw_interface_set_rss_queues(vnet_main_t *vnm, vnet_hw_interface_t *hi, clib_bitmap_t *bitmap)
walk_rc_t(* 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.
void vnet_hw_interface_walk(vnet_main_t *vnm, vnet_hw_interface_walk_t fn, void *ctx)
Walk all the HW interface.
static vnet_sw_interface_t * vnet_get_hw_sw_interface(vnet_main_t *vnm, u32 hw_if_index)
unformat_function_t unformat_vnet_hw_interface_flags
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
vl_api_address_family_t af
clib_error_t * set_hw_interface_change_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u8 queue_id_valid, u32 queue_id, vnet_hw_if_rx_mode mode)
format_function_t format_vtr
word vnet_sw_interface_compare(vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
static vnet_hw_interface_t * vnet_get_hw_interface_or_null(vnet_main_t *vnm, u32 hw_if_index)
static u32 vnet_hw_interface_get_mtu(vnet_main_t *vnm, u32 hw_if_index)
static void vnet_put_frame_to_sw_interface(vnet_main_t *vnm, u32 sw_if_index, vlib_frame_t *f)
format_function_t format_vnet_sw_interface_name_override
unformat_function_t unformat_vnet_sw_interface_flags
clib_error_t * vnet_rename_interface(vnet_main_t *vnm, u32 hw_if_index, char *new_name)
void vnet_hw_if_update_runtime_data(vnet_main_t *vnm, u32 hw_if_index)
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
int vnet_sw_interface_stats_collect_enable_disable(u32 sw_if_index, u8 enable)
u32 n_packets_to_capture
Number of packets to capture.
@ VNET_INTERFACE_OUTPUT_ERROR_INTERFACE_DELETED
void vnet_hw_interface_set_mtu(vnet_main_t *vnm, u32 hw_if_index, u32 mtu)
@ VNET_SW_INTERFACE_FLAG_HIDDEN
static vlib_main_t * vlib_get_main(void)
uword * interface_tag_by_sw_if_index
format_function_t format_vnet_sw_interface
void vnet_delete_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
@ VNET_SW_INTERFACE_TYPE_P2P
static uword vnet_sw_interface_is_up(vnet_main_t *vnm, u32 sw_if_index)
static uword vnet_hw_interface_get_flags(vnet_main_t *vnm, u32 hw_if_index)
void vnet_sw_interface_admin_down(vnet_main_t *vnm, u32 sw_if_index)
static f64 vlib_time_now(vlib_main_t *vm)
vnet_interface_output_error_t
@ VNET_SW_INTERFACE_TYPE_HARDWARE
static_always_inline void clib_spinlock_unlock_if_init(clib_spinlock_t *p)
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
clib_error_t * vnet_sw_interface_supports_addressing(vnet_main_t *vnm, u32 sw_if_index)
unformat_function_t unformat_vnet_buffer_flags
vnet_interface_output_next_t
static uword vnet_hw_interface_is_link_up(vnet_main_t *vnm, u32 hw_if_index)
vl_api_interface_index_t sw_if_index
u32 n_packets_captured
Number of packets currently captured.
enum walk_rc_t_ walk_rc_t
Walk return code.
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags)
struct _vnet_hw_interface_class vnet_hw_interface_class_t
vnet_interface_main_t interface_main
@ VNET_INTERFACE_OUTPUT_NEXT_DROP
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
format_function_t format_vnet_sw_interface_name
VLIB buffer representation.
manual_print typedef u8 mac_address[6]
vl_api_wireguard_peer_flags_t flags