FD.io VPP  v18.07-rc0-415-g6c78436
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)
 
#define F_SETPIPE_SZ   (1024 + 7)
 

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_internal (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd, int rx_tx)
 
static clib_error_tpcap_rx_trace_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpcap_tx_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_tshow_dpdk_physmem (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 int dpdk_device_queue_sort (void *a1, void *a2)
 
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_tx_trace_command
 (constructor) VLIB_CLI_COMMAND (pcap_tx_trace_command) More...
 
static vlib_cli_command_t pcap_rx_trace_command
 (constructor) VLIB_CLI_COMMAND (pcap_rx_trace_command) More...
 
static vlib_cli_command_t cmd_show_dpdk_buffer
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_buffer) More...
 
static vlib_cli_command_t cmd_show_dpdk_physmem
 (constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_physmem) 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_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 F_SETPIPE_SZ   (1024 + 7)
#define PCAP_DEF_PKT_TO_CAPTURE   (100)

Function Documentation

clib_error_t* dpdk_cli_init ( vlib_main_t vm)

Definition at line 2090 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 702 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 43 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_rx_trace_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 302 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* pcap_trace_command_internal ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd,
int  rx_tx 
)
inlinestatic

Definition at line 100 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_tx_trace_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 309 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 608 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 878 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 1219 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 773 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 966 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 1104 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 389 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 1851 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 1447 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 721 of file cli.c.

+ Here is the call graph for this function:

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

Definition at line 435 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 2006 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 520 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:608

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc)

Definition at line 694 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:878

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pipe)

Definition at line 956 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:1219

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pktfield)

Definition at line 1438 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:773

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_placement)

Definition at line 870 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:966

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_subport)

Definition at line 1094 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:1104

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_tctbl)

Definition at line 1211 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_buffer
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:389

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_buffer)

Definition at line 426 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:1851

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats)

Definition at line 1998 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:1447

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos)

Definition at line 1842 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:721

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos_placement)

Definition at line 765 of file cli.c.

vlib_cli_command_t cmd_show_dpdk_physmem
static
Initial value:
= {
.path = "show dpdk physmem",
.short_help = "show dpdk physmem",
.function = show_dpdk_physmem,
.is_mp_safe = 1,
}
static clib_error_t * show_dpdk_physmem(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:435

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_physmem)

Definition at line 511 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:520

(constructor) VLIB_CLI_COMMAND (cmd_test_dpdk_buffer)

Definition at line 599 of file cli.c.

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

(constructor) VLIB_CLI_COMMAND (pcap_rx_trace_command)

Definition at line 379 of file cli.c.

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

(constructor) VLIB_CLI_COMMAND (pcap_tx_trace_command)

Definition at line 373 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:2006

(constructor) VLIB_CLI_COMMAND (show_vpe_version_command)

Definition at line 2029 of file cli.c.