From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
"Mcnamara, John" <john.mcnamara@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] app/testpmd: metering and policing CLI clean up
Date: Sun, 7 Jan 2018 14:25:24 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810EF8B9E@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20171120163920.70660-1-jasvinder.singh@intel.com>
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Tuesday, November 21, 2017 12:39 AM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Mcnamara, John <john.mcnamara@intel.com>
> Subject: [PATCH 1/3] app/testpmd: metering and policing CLI clean up
>
> This patch updates the metering and policing CLIs as follows:
> - change name of set port meter CLI to create port meter and add meter
> enable option, dscp table entries arguments, action mask, policer actions
> and previous meter color option as an input color
> - set the right metering algorithm in add meter profile CLIs related to
> srtcm(rfc2697) and trtcm(rfc2698,rfc4115)
> - change clear flag type from uint32_t to string in show meter stats CLI
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
With minor comment:
> +static int
> +parse_dscp_table_entries(char *str, enum rte_mtr_color *dscp_table)
> +{
> + char *token;
> + int i = 0;
> +
> + token = strtok_r(str, PARSE_DELIMITER, &str);
> + if (token == NULL)
> + return 0;
> +
> + /* Allocate memory for dscp table */
> + dscp_table = (enum rte_mtr_color *)malloc(MAX_DSCP_TABLE_ENTRIES *
> + sizeof(enum rte_mtr_color));
> +
> + while (1) {
> + if (strcmp(token, "G") == 0 ||
> + strcmp(token, "g") == 0)
> + dscp_table[i++] = RTE_MTR_GREEN;
> + else if (strcmp(token, "Y") == 0 ||
> + strcmp(token, "y") == 0)
> + dscp_table[i++] = RTE_MTR_YELLOW;
> + else if (strcmp(token, "R") == 0 ||
> + strcmp(token, "r") == 0)
> + dscp_table[i++] = RTE_MTR_RED;
> + else {
> + free(dscp_table);
> + return -1;
> + }
> + if (i == MAX_DSCP_TABLE_ENTRIES)
> + break;
Is that meaning the size dscp table must be 64, can it be less than 64?
Thanks
Jingjing
next prev parent reply other threads:[~2018-01-07 14:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 16:39 Jasvinder Singh
2017-11-20 16:39 ` [dpdk-dev] [PATCH 2/3] app/testpmd: add CLI for metering and policing API Jasvinder Singh
2018-01-07 14:37 ` Wu, Jingjing
2017-11-20 16:39 ` [dpdk-dev] [PATCH 3/3] doc: add description of traffic metering and policing funcs in testpmd Jasvinder Singh
2017-12-11 11:18 ` Marko Kovacevic
2017-12-11 11:22 ` Mcnamara, John
2017-12-11 11:31 ` Mcnamara, John
2018-01-07 14:25 ` Wu, Jingjing [this message]
2018-01-08 10:25 ` [dpdk-dev] [PATCH 1/3] app/testpmd: metering and policing CLI clean up Singh, Jasvinder
2018-01-09 23:56 ` Thomas Monjalon
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=9BB6961774997848B5B42BEC655768F810EF8B9E@SHSMSX103.ccr.corp.intel.com \
--to=jingjing.wu@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=john.mcnamara@intel.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).