Add the new meter CIR configuration parameter, user can set the different value for committed information rate(CIR) parameter.
The usage as below: --meter-cir=N, default count is 1250000. Signed-off-by: Jiawei Wang <jiaw...@nvidia.com> Signed-off-by: Rongwei Liu <rongw...@nvidia.com> --- app/test-flow-perf/main.c | 8 +++++++- doc/guides/tools/flow-perf.rst | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index e0d94f943a..dd0aac8b06 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -141,6 +141,8 @@ usage(char *progname) " actions that support data, such as header modify and encap actions\n"); printf(" --policy-mtr: To create meter with policy\n"); printf(" --policy-g_actions: To set meter policy green color actions\n"); + printf(" --meter-cir=N: to set committed information rate(CIR)" + " parameter in meter profile, default is %d\n", METER_CIR); printf("To set flow attributes:\n"); printf(" --ingress: set ingress attribute in flows\n"); @@ -582,7 +584,7 @@ args_parse(int argc, char **argv) { "cores", 1, 0, 0 }, { "policy-mtr", 0, 0, 0 }, { "policy-g_actions", 1, 0, 0 }, - { "meter-profile-alg", 1, 0, 0 }, + { "meter-cir", 1, 0, 0 }, /* Attributes */ { "ingress", 0, 0, 0 }, { "egress", 0, 0, 0 }, @@ -814,6 +816,10 @@ args_parse(int argc, char **argv) } if (strcmp(lgopts[opt_idx].name, "policy-mtr") == 0) policy_mtr = true; + if (strcmp(lgopts[opt_idx].name, "meter-cir") == 0) { + n = atoi(optarg); + meter_cir = (uint64_t) n; + } if (strcmp(lgopts[opt_idx].name, "policy-g_actions") == 0) { token = strtok(optarg, ","); diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst index 90b6934537..113e078eb5 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -105,6 +105,9 @@ The command line options are: Such as header modify and encap actions. Default is using fixed data for any action that support data for all flows. +* ``--meter-cir=N`` + Set the committed information rate(CIR) parameter, default count is 1250000. + Attributes: * ``--ingress`` -- 2.27.0