FD.io VPP  v18.10-34-gcce845e
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 2074 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 694 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 294 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 96 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 301 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 600 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 870 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 1211 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 765 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 958 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 1096 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 381 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 1835 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 1435 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 713 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 427 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 1990 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 512 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:600

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc)

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

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pipe)

Definition at line 948 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:1211

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_pktfield)

Definition at line 1426 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:765

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_placement)

Definition at line 862 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:958

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_subport)

Definition at line 1086 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:1096

(constructor) VLIB_CLI_COMMAND (cmd_set_dpdk_if_hqos_tctbl)

Definition at line 1203 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:381

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_buffer)

Definition at line 418 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:1835

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats)

Definition at line 1982 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:1435

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos)

Definition at line 1826 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:713

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_if_hqos_placement)

Definition at line 757 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:427

(constructor) VLIB_CLI_COMMAND (cmd_show_dpdk_physmem)

Definition at line 503 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:512

(constructor) VLIB_CLI_COMMAND (cmd_test_dpdk_buffer)

Definition at line 591 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:294

(constructor) VLIB_CLI_COMMAND (pcap_rx_trace_command)

Definition at line 371 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:301

(constructor) VLIB_CLI_COMMAND (pcap_tx_trace_command)

Definition at line 365 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:1990

(constructor) VLIB_CLI_COMMAND (show_vpe_version_command)

Definition at line 2013 of file cli.c.