|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
23 #ifndef CLIB_MARCH_VARIANT
41 return (VNET_API_ERROR_INVALID_VALUE);
48 return (VNET_API_ERROR_FEATURE_DISABLED);
69 #define inc_counter(ctype, rx_tx) \
103 to_next[0] = bi0 =
from[0];
124 stats_n_packets[b0_ctype] += 1;
129 n_left_to_next, bi0, next0);
139 sw_if_index, stats_n_packets[ct], stats_n_bytes[ct]);
149 sw_if_index, stats_n_packets[ct], stats_n_bytes[ct]);
156 return frame->n_vectors;
175 .vector_size =
sizeof (
u32),
180 .
name =
"stats-collect-rx",
184 .vector_size =
sizeof (
u32),
189 .
name =
"stats-collect-tx",
193 .arc_name =
"device-input",
194 .node_name =
"stats-collect-rx",
199 .arc_name =
"interface-output",
200 .node_name =
"stats-collect-tx",
vnet_sw_interface_type_t type
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
@ VLIB_NODE_TYPE_INTERNAL
static int eh_dst_addr_to_rx_ctype(const ethernet_header_t *eh)
vlib_main_t vlib_node_runtime_t * node
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)
vlib_node_registration_t stats_collect_rx_node
(constructor) VLIB_REGISTER_NODE (stats_collect_rx_node)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
vnet_interface_counter_type_t
#define foreach_tx_combined_interface_counter(_x)
#define VLIB_NODE_FN(node)
vnet_main_t * vnet_get_main(void)
static u8 * format_stats_collect_trace(u8 *s, va_list *args)
static_always_inline uword vlib_get_thread_index(void)
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define static_always_inline
#define foreach_rx_combined_interface_counter(_x)
static_always_inline uword stats_collect_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t rxtx)
vlib_node_registration_t stats_collect_tx_node
(constructor) VLIB_REGISTER_NODE (stats_collect_tx_node)
struct _vlib_node_registration vlib_node_registration_t
vlib_combined_counter_main_t * combined_sw_if_counters
int vnet_sw_interface_stats_collect_enable_disable(u32 sw_if_index, u8 enable)
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
ethernet_main_t ethernet_main
vlib_put_next_frame(vm, node, next_index, 0)
#define VLIB_INIT_FUNCTION(x)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
static clib_error_t * stats_collect_init(vlib_main_t *vm)
static int eh_dst_addr_to_tx_ctype(const ethernet_header_t *eh)
#define VNET_FEATURES(...)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ VNET_N_COMBINED_INTERFACE_COUNTER
VNET_FEATURE_INIT(stats_collect_rx_node, static)
@ VNET_SW_INTERFACE_TYPE_HARDWARE
vl_api_interface_index_t sw_if_index
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
vl_api_fib_path_type_t type
vnet_interface_main_t interface_main
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)