29 "ID",
"Name",
"Type",
"LWP",
30 "lcore",
"Core",
"Socket",
"State");
32 #if !defined(__powerpc64__) 38 line =
format (line,
"%-7d%-20s%-12s%-8d",
47 line =
format (line,
"%-7u%-7u%-7u",
55 line =
format (line,
"wait");
58 line =
format (line,
"running");
61 line =
format (line,
"finished");
64 line =
format (line,
"unknown");
79 .path =
"show threads",
80 .short_help =
"Show threads",
126 for (fqix = 0; fqix < num_fq; fqix++)
133 memset (fqh, 0,
sizeof (*fqh));
141 .path =
"trace frame-queue",
142 .short_help =
"trace frame-queue (on|off)",
162 return (((two_counters[0] + two_counters[1]) * 100) +
163 (total - 1)) / total;
190 "16-17 18-19 20-21 22-23 24-25 26-27 28-29 30-31\n");
193 for (fqix = 0; fqix < num_fq; fqix++)
214 total += fqh->
count[nelt];
225 "%3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% " 226 "%3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%%\n",
247 " vector-threshold %d ring size %d in use %d\n",
252 " %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",
265 " %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",
297 .path =
"show frame-queue",
298 .short_help =
"show frame-queue trace",
305 .path =
"show frame-queue histogram",
306 .short_help =
"show frame-queue histogram",
324 if ((
unformat (input,
"%d", &nelts) != 1) ||
325 ((nelts != 4) && (nelts != 8) && (nelts != 16) && (nelts != 32)))
337 for (fqix = 0; fqix < num_fq; fqix++)
347 .path =
"test frame-queue nelts",
348 .short_help =
"test frame-queue nelts (4,8,16,32)",
366 if (
unformat (input,
"%d", &threshold))
385 for (fqix = 0; fqix < num_fq; fqix++)
395 .path =
"test frame-queue threshold",
396 .short_help =
"test frame-queue threshold N (0=no limit)",
static u32 compute_percent(u64 *two_counters, u64 total)
sll srl srl sll sra u16x4 i
frame_queue_trace_t * frame_queue_traces
static clib_error_t * show_frame_queue_trace(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_worker_thread_t * vlib_worker_threads
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
static clib_error_t * test_frame_queue_nelts(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * show_frame_queue_internal(vlib_main_t *vm, u32 histogram)
u64 count[FRAME_QUEUE_MAX_NELTS]
vlib_frame_queue_t ** vlib_frame_queues
struct lcore_config lcore_config[]
#define FRAME_QUEUE_MAX_NELTS
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
i32 n_vectors[FRAME_QUEUE_MAX_NELTS]
static clib_error_t * show_threads_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_free(V)
Free vector's memory (no header).
static vlib_thread_main_t * vlib_get_thread_main()
static clib_error_t * show_frame_queue_histogram(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * trace_frame_queue(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
frame_queue_nelt_counter_t * frame_queue_histogram
vhost_vring_state_t state
static clib_error_t * test_frame_queue_threshold(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define clib_error_return(e, args...)
#define CLIB_CACHE_LINE_BYTES
vlib_thread_registration_t * registration