40 #ifndef included_vlib_trace_funcs_h 41 #define included_vlib_trace_funcs_h 86 n_data_bytes =
round_pow2 (n_data_bytes,
sizeof (h[0]));
87 n_data_words = n_data_bytes /
sizeof (h[0]);
89 1 + n_data_words,
sizeof (h[0]));
170 b->
flags |= VLIB_BUFFER_IS_TRACED;
182 b_target->
flags |= b->
flags & VLIB_BUFFER_IS_TRACED;
208 ASSERT (count <= tn->limit);
218 uword next_buffer_stride,
219 uword n_buffer_data_bytes_in_trace);
volatile u32 main_loop_count
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
vlib_main_t vlib_global_main
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)
static u32 vlib_buffer_make_trace_handle(u32 thread, u32 pool_index)
Construct a trace handle from thread and pool index.
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
vlib_trace_node_t * nodes
static vlib_trace_header_t * vlib_trace_header_next(vlib_trace_header_t *h)
#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_buffer_callback_t * trace_buffer_callback
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static void vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
vlib_trace_header_t ** trace_buffer_pool
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static void vlib_trace_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index)
static vlib_next_frame_t * vlib_node_runtime_get_next_frame(vlib_main_t *vm, vlib_node_runtime_t *n, u32 next_index)
static void vlib_free_trace(vlib_main_t *vm, vlib_buffer_t *b)
void vlib_add_handoff_trace(vlib_main_t *vm, vlib_buffer_t *b)
u32 trace_handle
Specifies trace buffer handle if VLIB_PACKET_IS_TRACED flag is set.
vlib_add_trace_callback_t * add_trace_callback
u32 node_index
Node index.
int vnet_is_packet_traced(vlib_buffer_t *b, u32 classify_table_index, int func)
static void vlib_buffer_copy_trace_flag(vlib_main_t *vm, vlib_buffer_t *b, u32 bi_target)
void trace_apply_filter(vlib_main_t *vm)
static u32 vlib_buffer_get_trace_thread(vlib_buffer_t *b)
Extract the thread id from a trace handle.
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.
#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)
#define pool_put_index(p, i)
Free pool element with given index.
vlib_trace_main_t trace_main
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
VLIB buffer representation.
vlib_trace_filter_t trace_filter
static void vlib_validate_trace(vlib_trace_main_t *tm, vlib_buffer_t *b)
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
u32 trace_classify_table_index
u64 cpu_time_last_node_dispatch