git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples/ip_pipeline: add config flexibility to TM
[dpdk.git]
/
examples
/
ip_pipeline
/
cli.c
diff --git
a/examples/ip_pipeline/cli.c
b/examples/ip_pipeline/cli.c
index
770b3bc
..
f4c2be8
100644
(file)
--- a/
examples/ip_pipeline/cli.c
+++ b/
examples/ip_pipeline/cli.c
@@
-377,7
+377,9
@@
cmd_swq(char **tokens,
static const char cmd_tmgr_subport_profile_help[] =
"tmgr subport profile\n"
" <tb_rate> <tb_size>\n"
static const char cmd_tmgr_subport_profile_help[] =
"tmgr subport profile\n"
" <tb_rate> <tb_size>\n"
-" <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate>\n"
+" <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> <tc4_rate>"
+" <tc5_rate> <tc6_rate> <tc7_rate> <tc8_rate>"
+" <tc9_rate> <tc10_rate> <tc11_rate> <tc12_rate>\n"
" <tc_period>\n";
static void
" <tc_period>\n";
static void
@@
-389,7
+391,7
@@
cmd_tmgr_subport_profile(char **tokens,
struct rte_sched_subport_params p;
int status, i;
struct rte_sched_subport_params p;
int status, i;
- if (n_tokens != 1
0
) {
+ if (n_tokens != 1
9
) {
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
@@
-410,7
+412,7
@@
cmd_tmgr_subport_profile(char **tokens,
return;
}
return;
}
- if (parser_read_uint32(&p.tc_period, tokens[
9
]) != 0) {
+ if (parser_read_uint32(&p.tc_period, tokens[
18
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
return;
}
snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
return;
}
@@
-425,10
+427,12
@@
cmd_tmgr_subport_profile(char **tokens,
static const char cmd_tmgr_pipe_profile_help[] =
"tmgr pipe profile\n"
" <tb_rate> <tb_size>\n"
static const char cmd_tmgr_pipe_profile_help[] =
"tmgr pipe profile\n"
" <tb_rate> <tb_size>\n"
-" <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate>\n"
+" <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> <tc4_rate>"
+" <tc5_rate> <tc6_rate> <tc7_rate> <tc8_rate>"
+" <tc9_rate> <tc10_rate> <tc11_rate> <tc12_rate>\n"
" <tc_period>\n"
" <tc_ov_weight>\n"
" <tc_period>\n"
" <tc_ov_weight>\n"
-" <wrr_weight0..
15
>\n";
+" <wrr_weight0..
3
>\n";
static void
cmd_tmgr_pipe_profile(char **tokens,
static void
cmd_tmgr_pipe_profile(char **tokens,
@@
-439,7
+443,7
@@
cmd_tmgr_pipe_profile(char **tokens,
struct rte_sched_pipe_params p;
int status, i;
struct rte_sched_pipe_params p;
int status, i;
- if (n_tokens != 2
7
) {
+ if (n_tokens != 2
4
) {
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
@@
-460,20
+464,20
@@
cmd_tmgr_pipe_profile(char **tokens,
return;
}
return;
}
- if (parser_read_uint32(&p.tc_period, tokens[
9
]) != 0) {
+ if (parser_read_uint32(&p.tc_period, tokens[
18
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
return;
}
#ifdef RTE_SCHED_SUBPORT_TC_OV
snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
return;
}
#ifdef RTE_SCHED_SUBPORT_TC_OV
- if (parser_read_uint8(&p.tc_ov_weight, tokens[1
0
]) != 0) {
+ if (parser_read_uint8(&p.tc_ov_weight, tokens[1
9
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "tc_ov_weight");
return;
}
#endif
snprintf(out, out_size, MSG_ARG_INVALID, "tc_ov_weight");
return;
}
#endif
- for (i = 0; i < RTE_SCHED_QUEUES_PER_PIPE; i++)
- if (parser_read_uint8(&p.wrr_weights[i], tokens[
11
+ i]) != 0) {
+ for (i = 0; i < RTE_SCHED_
BE_
QUEUES_PER_PIPE; i++)
+ if (parser_read_uint8(&p.wrr_weights[i], tokens[
20
+ i]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "wrr_weights");
return;
}
snprintf(out, out_size, MSG_ARG_INVALID, "wrr_weights");
return;
}
@@
-490,7
+494,10
@@
static const char cmd_tmgr_help[] =
" rate <rate>\n"
" spp <n_subports_per_port>\n"
" pps <n_pipes_per_subport>\n"
" rate <rate>\n"
" spp <n_subports_per_port>\n"
" pps <n_pipes_per_subport>\n"
-" qsize <qsize_tc0> <qsize_tc1> <qsize_tc2> <qsize_tc3>\n"
+" qsize <qsize_tc0> <qsize_tc1> <qsize_tc2>"
+" <qsize_tc3> <qsize_tc4> <qsize_tc5> <qsize_tc6>"
+" <qsize_tc7> <qsize_tc8> <qsize_tc9> <qsize_tc10>"
+" <qsize_tc11> <qsize_tc12>\n"
" fo <frame_overhead>\n"
" mtu <mtu>\n"
" cpu <cpu_id>\n";
" fo <frame_overhead>\n"
" mtu <mtu>\n"
" cpu <cpu_id>\n";
@@
-506,7
+513,7
@@
cmd_tmgr(char **tokens,
struct tmgr_port *tmgr_port;
int i;
struct tmgr_port *tmgr_port;
int i;
- if (n_tokens !=
19
) {
+ if (n_tokens !=
28
) {
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
return;
}
@@
-554,32
+561,32
@@
cmd_tmgr(char **tokens,
return;
}
return;
}
- if (strcmp(tokens[
13
], "fo") != 0) {
+ if (strcmp(tokens[
22
], "fo") != 0) {
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "fo");
return;
}
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "fo");
return;
}
- if (parser_read_uint32(&p.frame_overhead, tokens[
14
]) != 0) {
+ if (parser_read_uint32(&p.frame_overhead, tokens[
23
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "frame_overhead");
return;
}
snprintf(out, out_size, MSG_ARG_INVALID, "frame_overhead");
return;
}
- if (strcmp(tokens[
15
], "mtu") != 0) {
+ if (strcmp(tokens[
24
], "mtu") != 0) {
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "mtu");
return;
}
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "mtu");
return;
}
- if (parser_read_uint32(&p.mtu, tokens[
16
]) != 0) {
+ if (parser_read_uint32(&p.mtu, tokens[
25
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "mtu");
return;
}
snprintf(out, out_size, MSG_ARG_INVALID, "mtu");
return;
}
- if (strcmp(tokens[
17
], "cpu") != 0) {
+ if (strcmp(tokens[
26
], "cpu") != 0) {
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cpu");
return;
}
snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cpu");
return;
}
- if (parser_read_uint32(&p.cpu_id, tokens[
18
]) != 0) {
+ if (parser_read_uint32(&p.cpu_id, tokens[
27
]) != 0) {
snprintf(out, out_size, MSG_ARG_INVALID, "cpu_id");
return;
}
snprintf(out, out_size, MSG_ARG_INVALID, "cpu_id");
return;
}