From: Thomas Monjalon <thomas@monjalon.net>
To: Wisam Monther <wisamm@nvidia.com>, Rongwei Liu <rongweil@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>,
Raslan Darawsheh <rasland@nvidia.com>,
Haifei Luo <haifeil@nvidia.com>,
"Jiawei(Jonny) Wang" <jiaweiw@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH v3 1/3] app/flow-perf: support meter policy API
Date: Fri, 05 Nov 2021 11:34:18 +0100 [thread overview]
Message-ID: <6106963.jHQkdsGB6Q@thomas> (raw)
In-Reply-To: <DM6PR12MB5520855E2A7AC4B15A32261FAB8E9@DM6PR12MB5520.namprd12.prod.outlook.com>
05/11/2021 11:24, Rongwei Liu:
> HI Tomas:
> Flow-perf application run-time options are growing quickly and some of them are a little complex.
> Under current architecture, I don't find a valid way to reduce the indention level unless maintainer agree to simply the logic.
Trust checkpatch, it is possible.
One basic solution is to have sub-functions.
Please do not top-post.
> For the fill_actions() function, I will rebase it once our github branch updated.
> It should be something like:
>
> > > + fill_actions(actions[i], all_actions[i], 0, 0, 0,
> > > + 0, 0, 0, unique_data, rx_queues_count, dst_port);
>
> BR
> Rongwei
>
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Friday, November 5, 2021 5:58 PM
> > To: Wisam Monther <wisamm@nvidia.com>; Rongwei Liu
> > <rongweil@nvidia.com>
> > Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> > <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; dev@dpdk.org;
> > Raslan Darawsheh <rasland@nvidia.com>; Haifei Luo <haifeil@nvidia.com>;
> > Jiawei(Jonny) Wang <jiaweiw@nvidia.com>
> > Subject: Re: [dpdk-dev] [PATCH v3 1/3] app/flow-perf: support meter policy
> > API
> >
> > External email: Use caution opening links or attachments
> >
> >
> > 28/10/2021 05:25, Rongwei Liu:
> > > @@ -854,6 +862,46 @@ args_parse(int argc, char **argv)
> > > RTE_MAX_LCORE);
> > > }
> > > }
> > > + if (strcmp(lgopts[opt_idx].name, "policy-mtr") == 0) {
> > > + j = 0;
> > > + k = 0;
> > > + arg = optarg;
> > > + policy_mtr = true;
> > > + token = strsep(&arg, ":\0");
> > > + while (token != NULL && j < RTE_COLORS) {
> > > + actions_str[j++] = token;
> > > + token = strsep(&arg, ":\0");
> > > + }
> > > + j = 0;
> > > + token = strtok(actions_str[0], ",\0");
> > > + while (token == NULL && j < RTE_COLORS - 1)
> > > + token = strtok(actions_str[++j], ",\0");
> > > + while (j < RTE_COLORS && token != NULL) {
> > > + for (i = 0;
> > > + i < RTE_DIM(flow_options); i++) {
> > > + if (!strcmp(token,
> > > + flow_options[i].str)) {
> > > + all_actions[j][k++] =
> > > + flow_options[i].mask;
> > > + break;
> > > + }
> > > + }
> > > + /* Reached last item with no match */
> > > + if (i >= RTE_DIM(flow_options)) {
> > > + fprintf(stderr,
> > > + "Invalid actions "
> > > + "item: %s\n", token);
> > > + usage(argv[0]);
> > > + rte_exit(EXIT_SUCCESS, "Invalid actions item\n");
> > > + }
> > > + token = strtok(NULL, ",\0");
> > > + while (!token && j < RTE_COLORS - 1) {
> > > + token = strtok(actions_str[++j],
> > > + ",\0");
> > > + k = 0;
> > > + }
> > > + }
> > > + }
> >
> > Could we avoid having so many indents?
> > Checkpatch suggest considering a refactoring.
> >
> > [...]
> > > + fill_actions(actions[i], all_actions[i], 0, 0, 0,
> > > + 0, 0, 0, unique_data, rx_queues_count);
> >
> > error: too few arguments to function ‘fill_actions’
> >
> > That's a rebase issue because I merged first the patch
> > "app/flow-perf: add destination ports parameter"
> >
> >
>
>
next prev parent reply other threads:[~2021-11-05 10:34 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 6:50 [dpdk-dev] [PATCH] " Haifei Luo
2021-05-09 10:47 ` Wisam Monther
2021-07-21 7:05 ` [dpdk-dev] [PATCH v2 0/3] support new format meter Rongwei Liu
2021-07-21 7:05 ` [dpdk-dev] [PATCH v2 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-09-26 9:45 ` Wisam Monther
2021-10-28 3:25 ` [dpdk-dev] [PATCH v3 0/3] add meter policy support in flow-perf Rongwei Liu
2021-10-28 3:25 ` [dpdk-dev] [PATCH v3 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-05 9:57 ` Thomas Monjalon
2021-11-05 10:24 ` Rongwei Liu
2021-11-05 10:34 ` Thomas Monjalon [this message]
2021-11-08 8:53 ` [dpdk-dev] [PATCH v4 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08 8:53 ` [dpdk-dev] [PATCH v4 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 9:05 ` Thomas Monjalon
2021-11-08 9:23 ` [dpdk-dev] [PATCH v5 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08 9:23 ` [dpdk-dev] [PATCH v5 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 9:23 ` [dpdk-dev] [PATCH v5 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 9:23 ` [dpdk-dev] [PATCH v5 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-11-08 9:35 ` [dpdk-dev] [PATCH v5 0/3] add meter policy support in flow-perf Thomas Monjalon
2021-11-08 9:39 ` Rongwei Liu
2021-11-08 9:40 ` Thomas Monjalon
2021-11-08 9:58 ` [dpdk-dev] [PATCH v6 " Rongwei Liu
2021-11-08 9:58 ` [dpdk-dev] [PATCH v6 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 10:08 ` Thomas Monjalon
2021-11-08 9:58 ` [dpdk-dev] [PATCH v6 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 10:10 ` Thomas Monjalon
2021-11-08 9:58 ` [dpdk-dev] [PATCH v6 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-11-08 11:10 ` [dpdk-dev] [PATCH v7 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08 11:10 ` [dpdk-dev] [PATCH v7 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 11:10 ` [dpdk-dev] [PATCH v7 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 11:10 ` [dpdk-dev] [PATCH v7 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-11-10 12:57 ` [dpdk-dev] [PATCH v8 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-10 12:57 ` [dpdk-dev] [PATCH v8 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-10 12:57 ` [dpdk-dev] [PATCH v8 2/3] app/flow-perf: support dynamic values for meter profile Rongwei Liu
2021-11-10 12:57 ` [dpdk-dev] [PATCH v8 3/3] app/flow-perf: add packet metering mode Rongwei Liu
2021-11-11 14:23 ` [PATCH v9 0/5] add meter policy support in flow-perf Rongwei Liu
2021-11-11 14:23 ` [PATCH v9 1/5] app/flow-perf: define flow-options as global Rongwei Liu
2021-11-16 10:05 ` Wisam Monther
2021-11-11 14:23 ` [PATCH v9 2/5] app/flow-perf: support meter policy API Rongwei Liu
2021-11-16 10:05 ` Wisam Monther
2021-11-11 14:23 ` [PATCH v9 3/5] app/flow-perf: support dynamic values for meter profile Rongwei Liu
2021-11-16 10:05 ` Wisam Monther
2021-11-11 14:23 ` [PATCH v9 4/5] app/flow-perf: add packet metering mode Rongwei Liu
2021-11-16 10:05 ` Wisam Monther
2021-11-11 14:23 ` [PATCH v9 5/5] app/flow-perf: fix previous wrong indentation Rongwei Liu
2021-11-16 10:05 ` Wisam Monther
2021-11-16 10:07 ` Rongwei Liu
2021-11-16 11:33 ` [PATCH v9 0/5] add meter policy support in flow-perf Thomas Monjalon
2021-11-08 8:53 ` [dpdk-dev] [PATCH v4 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 8:53 ` [dpdk-dev] [PATCH v4 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-10-28 3:25 ` [dpdk-dev] [PATCH v3 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-10-28 3:26 ` [dpdk-dev] [PATCH v3 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-07-21 7:05 ` [dpdk-dev] [PATCH v2 2/3] app/flow-perf: add new meter CIR Configuration Rongwei Liu
2021-09-26 9:46 ` Wisam Monther
2021-07-21 7:05 ` [dpdk-dev] [PATCH v2 3/3] app/flow-perf: add the supports for meter PPS Rongwei Liu
2021-09-26 9:47 ` Wisam Monther
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6106963.jHQkdsGB6Q@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=haifeil@nvidia.com \
--cc=jiaweiw@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=rongweil@nvidia.com \
--cc=viacheslavo@nvidia.com \
--cc=wisamm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).