|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_vlib_trace_funcs_h
41 #define included_vlib_trace_funcs_h
61 u32 n_data_words, trace_index;
99 n_data_bytes =
round_pow2 (n_data_bytes,
sizeof (
h[0]));
100 n_data_words = n_data_bytes /
sizeof (
h[0]);
105 h->n_data = n_data_words;
106 h->node_index =
r->node_index;
119 return h + 1 +
h->n_data;
193 b->
flags |= VLIB_BUFFER_IS_TRACED;
207 b_target->
flags |=
b->
flags & VLIB_BUFFER_IS_TRACED;
219 tn = tm->
nodes +
rt->node_index;
231 ASSERT (count <= tn->limit);
241 uword next_buffer_stride,
242 uword n_buffer_data_bytes_in_trace);
u8 * vnet_trace_placeholder
volatile u32 main_loop_count
static void vlib_trace_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index)
int vnet_is_packet_traced(vlib_buffer_t *b, u32 classify_table_index, int func)
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_main_t vlib_node_runtime_t * node
void trace_apply_filter(vlib_main_t *vm)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
u32 trace_handle
Specifies trace buffer handle if VLIB_PACKET_IS_TRACED flag is set.
static u32 vlib_buffer_get_trace_thread(vlib_buffer_t *b)
Extract the thread id from a trace handle.
vnet_hw_if_output_node_runtime_t * r
#define pool_put_index(p, i)
Free pool element with given index.
static void vlib_buffer_copy_trace_flag(vlib_main_t *vm, vlib_buffer_t *b, u32 bi_target)
vlib_trace_filter_t trace_filter
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static uword round_pow2(uword x, uword pow2)
static void vlib_validate_trace(vlib_trace_main_t *tm, vlib_buffer_t *b)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static vlib_trace_header_t * vlib_trace_header_next(vlib_trace_header_t *h)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vlib_global_main_t vlib_global_main
u64 cpu_time_last_node_dispatch
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
vlib_trace_buffer_callback_t * trace_buffer_callback
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
static vlib_buffer_t * vlib_get_next_buffer(vlib_main_t *vm, vlib_buffer_t *b)
Get next buffer in buffer linklist, or zero for end of list.
static u32 vlib_buffer_make_trace_handle(u32 thread, u32 pool_index)
Construct a trace handle from thread and pool index.
static void * vlib_add_trace_inline(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
vlib_add_trace_callback_t * add_trace_callback
#define vec_add2_aligned(V, P, N, A)
Add N elements to end of vector V, return pointer to new elements in P.
vlib_trace_header_t ** trace_buffer_pool
int vlib_add_handoff_trace(vlib_main_t *vm, vlib_buffer_t *b)
vlib_trace_node_t * nodes
void vlib_trace_frame_buffers_only(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, uword n_buffers, uword next_buffer_stride, uword n_buffer_data_bytes_in_trace)
vnet_interface_output_runtime_t * rt
static void vlib_free_trace(vlib_main_t *vm, vlib_buffer_t *b)
vlib_trace_main_t trace_main
static __clib_warn_unused_result int vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static vlib_next_frame_t * vlib_node_runtime_get_next_frame(vlib_main_t *vm, vlib_node_runtime_t *n, u32 next_index)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.