|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
26 long i = va_arg (*args,
long);
27 struct sched_param sched_param;
30 switch (sched_getscheduler (
i))
32 #define _(v,f,str) case SCHED_POLICY_##f: t = (u8 *) str; break;
36 if (sched_getparam (
i, &sched_param) == 0)
37 return format (s,
"%s (%d)", t, sched_param.sched_priority);
39 return format (s,
"%s (n/a)", t);
50 "ID",
"Name",
"Type",
"LWP",
"Sched Policy (Priority)",
51 "lcore",
"Core",
"Socket",
"State");
53 #if !defined(__powerpc64__)
59 line =
format (line,
"%-7d%-20s%-12s%-8d",
71 line =
format (line,
"%-7u%-7u%-7u%",
cpu_id, core_id, numa_id);
75 line =
format (line,
"%-7s%-7s%-7s%",
"n/a",
"n/a",
"n/a");
89 .path =
"show threads",
90 .short_help =
"Show threads",
120 else if (
unformat (line_input,
"off"))
147 "expecting valid worker handoff queue index");
166 for (fqix = 0; fqix < num_fq; fqix++)
185 .path =
"trace frame-queue",
186 .short_help =
"trace frame-queue (on|off)",
206 return (((two_counters[0] + two_counters[1]) * 100) +
207 (total - 1)) / total;
234 "16-17 18-19 20-21 22-23 24-25 26-27 28-29 30-31\n");
237 for (fqix = 0; fqix < num_fq; fqix++)
258 total += fqh->
count[nelt];
269 "%3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% "
270 "%3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%% %3d%%\n",
291 " vector-threshold %d ring size %d in use %d\n",
296 " %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",
309 " %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",
367 .path =
"show frame-queue",
368 .short_help =
"show frame-queue trace",
375 .path =
"show frame-queue histogram",
376 .short_help =
"show frame-queue histogram",
403 if (
unformat (line_input,
"nelts %u", &nelts))
418 "expecting valid worker handoff queue index");
424 if ((nelts != 4) && (nelts != 8) && (nelts != 16) && (nelts != 32))
437 for (fqix = 0; fqix < num_fq; fqix++)
450 .path =
"test frame-queue nelts",
451 .short_help =
"test frame-queue nelts (4,8,16,32)",
478 if (
unformat (line_input,
"threshold %u", &threshold))
493 "expecting valid worker handoff queue index");
500 if (threshold == ~(
u32) 0)
516 for (fqix = 0; fqix < num_fq; fqix++)
529 .path =
"test frame-queue threshold",
530 .short_help =
"test frame-queue threshold N (0=no limit)",
static u32 compute_percent(u64 *two_counters, u64 total)
static clib_error_t * test_frame_queue_threshold(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_sched_policy_and_priority(u8 *s, va_list *args)
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_worker_thread_t * vlib_worker_threads
frame_queue_trace_t * frame_queue_traces
static vlib_cli_command_t cmd_show_frame_queue_histogram
(constructor) VLIB_CLI_COMMAND (cmd_show_frame_queue_histogram)
static vlib_cli_command_t cmd_show_frame_queue_trace
(constructor) VLIB_CLI_COMMAND (cmd_show_frame_queue_trace)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static clib_error_t * show_frame_queue_internal(vlib_main_t *vm, vlib_frame_queue_main_t *fqm, u32 histogram)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static clib_error_t * show_threads_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
static clib_error_t * trace_frame_queue(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_frame_queue_t ** vlib_frame_queues
sll srl srl sll sra u16x4 i
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * show_frame_queue_trace(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t show_threads_command
(constructor) VLIB_CLI_COMMAND (show_threads_command)
#define CLIB_CACHE_LINE_BYTES
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define FRAME_QUEUE_MAX_NELTS
i32 n_vectors[FRAME_QUEUE_MAX_NELTS]
#define vec_free(V)
Free vector's memory (no header).
vlib_thread_registration_t * registration
format_function_t format_vlib_node_name
description fragment has unexpected format
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_histogram(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_foreach(var, vec)
Vector iterator.
#define foreach_sched_policy
u64 count[FRAME_QUEUE_MAX_NELTS]
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
frame_queue_nelt_counter_t * frame_queue_histogram
static vlib_cli_command_t cmd_test_frame_queue_threshold
(constructor) VLIB_CLI_COMMAND (cmd_test_frame_queue_threshold)
static vlib_cli_command_t cmd_test_frame_queue_nelts
(constructor) VLIB_CLI_COMMAND (cmd_test_frame_queue_nelts)
static vlib_cli_command_t cmd_trace_frame_queue
(constructor) VLIB_CLI_COMMAND (cmd_trace_frame_queue)
static vlib_thread_main_t * vlib_get_thread_main()
vlib_frame_queue_main_t * frame_queue_mains