FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
cli.c File Reference

CLI for DPDK Abstraction Layer and pcap Tx Trace. More...

+ Include dependency graph for cli.c:

Go to the source code of this file.

Macros

#define PCAP_DEF_PKT_TO_CAPTURE   (100)
 

Functions

static clib_error_tget_hqos (u32 hw_if_index, u32 subport_id, dpdk_device_t **xd, dpdk_device_config_t **devconf)
 
static clib_error_tpcap_trace_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_buffer (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_ttest_dpdk_buffer (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_desc (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_if_placement (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static int dpdk_device_queue_sort (void *a1, void *a2)
 
static clib_error_tset_dpdk_if_placement (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_if_hqos_placement (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_hqos_placement (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_hqos_pipe (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_hqos_subport (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_hqos_tctbl (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_dpdk_if_hqos_pktfield (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_if_hqos (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_hqos_queue_stats (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_dpdk_version_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tdpdk_cli_init (vlib_main_t *vm)
 

Variables

static vlib_cli_command_t pcap_trace_command
 (constructor) VLIB_CLI_COMMAND (pcap_trace_command) More...
 
static vlib_cli_command_t cmd_show_dpdk_bufferr
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_bufferr) More...
 
static vlib_cli_command_t cmd_test_dpdk_buffer
 (constructor) VLIB_CLI_COMMAND (cmd_test_dpdk_buffer) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_desc
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc) More...
 
static vlib_cli_command_t cmd_show_dpdk_if_placement
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_placement) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_placement
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_placement) More...
 
static vlib_cli_command_t cmd_show_dpdk_if_hqos_placement
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos_placement) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_hqos_placement
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_placement) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_hqos_pipe
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pipe) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_hqos_subport
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_subport) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_hqos_tctbl
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_tctbl) More...
 
static vlib_cli_command_t cmd_set_dpdk_if_hqos_pktfield
 (constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pktfield) More...
 
static vlib_cli_command_t cmd_show_dpdk_if_hqos
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos) More...
 
static vlib_cli_command_t cmd_show_dpdk_hqos_queue_stats
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats) More...
 
static vlib_cli_command_t show_vpe_version_command
 (constructor) VLIB_CLI_COMMAND (show_vpe_version_command) More...
 

Detailed Description

CLI for DPDK Abstraction Layer and pcap Tx Trace.

This file contains the source code for CLI for DPDK Abstraction Layer and pcap Tx Trace.

Definition in file cli.c.

Macro Definition Documentation

#define PCAP_DEF_PKT_TO_CAPTURE   (100)

Function Documentation

clib_error_t* dpdk_cli_init ( vlib_main_t vm)

Definition at line 2066 of file cli.c.

+ Here is the caller graph for this function:

static int dpdk_device_queue_sort ( void *  a1,
void *  a2 
)
static

Definition at line 622 of file cli.c.

+ Here is the caller graph for this function:

static clib_error_t* get_hqos ( u32  hw_if_index,
u32  subport_id,
dpdk_device_t **  xd,
dpdk_device_config_t **  devconf 
)
static

Definition at line 38 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* pcap_trace_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 87 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_desc ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 476 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_hqos_pipe ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 923 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_hqos_pktfield ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1264 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_hqos_placement ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 818 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_hqos_subport ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1011 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_hqos_tctbl ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1149 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* set_dpdk_if_placement ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 640 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_buffer ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 342 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_hqos_queue_stats ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1880 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_if_hqos ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1484 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_if_hqos_placement ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 766 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_if_placement ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 567 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* show_dpdk_version_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2035 of file cli.c.

static clib_error_t* test_dpdk_buffer ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 388 of file cli.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t cmd_set_dpdk_if_desc
static
Initial value:
= {
.path = "set dpdk interface descriptors",
.short_help = "set dpdk interface descriptors <interface> [rx <nn>] [tx <nn>]",
.function = set_dpdk_if_desc,
}
static clib_error_t * set_dpdk_if_desc(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:476

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc)

Definition at line 559 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_hqos_pipe
static
Initial value:
=
{
.path = "set dpdk interface hqos pipe",
.short_help = "set dpdk interface hqos pipe <interface> subport <subport_id> pipe <pipe_id> "
"profile <profile_id>",
.function = set_dpdk_if_hqos_pipe,
}
static clib_error_t * set_dpdk_if_hqos_pipe(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:923

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pipe)

Definition at line 1001 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_hqos_pktfield
static
Initial value:
= {
.path = "set dpdk interface hqos pktfield",
.short_help = "set dpdk interface hqos pktfield <interface> id subport|pipe|tc offset <n> "
"mask <hex-mask>",
}
static clib_error_t * set_dpdk_if_hqos_pktfield(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:1264

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pktfield)

Definition at line 1475 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_hqos_placement
static
Initial value:
= {
.path = "set dpdk interface hqos placement",
.short_help = "set dpdk interface hqos placement <interface> thread <n>",
}
static clib_error_t * set_dpdk_if_hqos_placement(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:818

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_placement)

Definition at line 915 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_hqos_subport
static
Initial value:
= {
.path = "set dpdk interface hqos subport",
.short_help = "set dpdk interface hqos subport <interface> subport <subport_id> "
"[rate <n>] [bktsize <n>] [tc0 <n>] [tc1 <n>] [tc2 <n>] [tc3 <n>] "
"[period <n>]",
}
static clib_error_t * set_dpdk_if_hqos_subport(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:1011

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_subport)

Definition at line 1139 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_hqos_tctbl
static
Initial value:
= {
.path = "set dpdk interface hqos tctbl",
.short_help = "set dpdk interface hqos tctbl <interface> entry <map_val> tc <tc_id> queue <queue_id>",
}
static clib_error_t * set_dpdk_if_hqos_tctbl(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:1149

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_tctbl)

Definition at line 1256 of file cli.c.

vlib_cli_command_t cmd_set_dpdk_if_placement
static
Initial value:
= {
.path = "set dpdk interface placement",
.short_help = "set dpdk interface placement <interface> [queue <n>] thread <n>",
.function = set_dpdk_if_placement,
}
static clib_error_t * set_dpdk_if_placement(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:640

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_placement)

Definition at line 758 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_bufferr
static
Initial value:
= {
.path = "show dpdk buffer",
.short_help = "show dpdk buffer",
.function = show_dpdk_buffer,
.is_mp_safe = 1,
}
static clib_error_t * show_dpdk_buffer(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:342

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_bufferr)

Definition at line 379 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_hqos_queue_stats
static
Initial value:
= {
.path = "show dpdk hqos queue",
.short_help = "show dpdk hqos queue <interface> subport <subport_id> pipe <pipe_id> tc <tc_id> tc_q <queue_id>",
}
static clib_error_t * show_dpdk_hqos_queue_stats(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:1880

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats)

Definition at line 2027 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_if_hqos
static
Initial value:
= {
.path = "show dpdk interface hqos",
.short_help = "show dpdk interface hqos <interface>",
.function = show_dpdk_if_hqos,
}
static clib_error_t * show_dpdk_if_hqos(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:1484

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos)

Definition at line 1871 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_if_hqos_placement
static
Initial value:
= {
.path = "show dpdk interface hqos placement",
.short_help = "show dpdk interface hqos placement",
}
static clib_error_t * show_dpdk_if_hqos_placement(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:766

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos_placement)

Definition at line 810 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_if_placement
static
Initial value:
= {
.path = "show dpdk interface placement",
.short_help = "show dpdk interface placement",
}
static clib_error_t * show_dpdk_if_placement(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:567

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_placement)

Definition at line 614 of file cli.c.

vlib_cli_command_t cmd_test_dpdk_buffer
static
Initial value:
= {
.path = "test dpdk buffer",
.short_help = "test dpdk buffer [allocate <nn>] [free <nn>]",
.function = test_dpdk_buffer,
.is_mp_safe = 1,
}
static clib_error_t * test_dpdk_buffer(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:388

(constructor) VLIB_CLI_COMMAND (cmd_test_dpdk_buffer)

Definition at line 467 of file cli.c.

vlib_cli_command_t pcap_trace_command
static
Initial value:
= {
.path = "pcap tx trace",
.short_help =
"pcap tx trace [on|off] [max <nn>] [intfc <interface>|any] [file <name>] [status]",
.function = pcap_trace_command_fn,
}
static clib_error_t * pcap_trace_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:87

(constructor) VLIB_CLI_COMMAND (pcap_trace_command)

Definition at line 332 of file cli.c.

vlib_cli_command_t show_vpe_version_command
static
Initial value:
= {
.path = "show dpdk version",
.short_help = "show dpdk version",
}
static clib_error_t * show_dpdk_version_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:2035

(constructor) VLIB_CLI_COMMAND (show_vpe_version_command)

Definition at line 2058 of file cli.c.