From: Tomasz Duszynski <tdu@semihalf.com>
To: dev@dpdk.org
Cc: Tomasz Duszynski <tdu@semihalf.com>, cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH] app/testpmd: set metering algorithm to the correct value
Date: Fri, 22 Dec 2017 17:32:37 +0100 [thread overview]
Message-ID: <1513960357-26092-1-git-send-email-tdu@semihalf.com> (raw)
No meter what option for traffic metering algorithm was given
on the testpmd command line value 0 (RTE_MTR_NONE) was set
and passed to the driver.
Fix that by setting traffic metering algorithm to the proper value.
Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Cc: cristian.dumitrescu@intel.com
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
app/test-pmd/cmdline_mtr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index d8d806d..8dad8f8 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -171,7 +171,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
/* Private shaper profile params */
memset(&mp, 0, sizeof(struct rte_mtr_meter_profile));
- mp.alg = 0;
+ mp.alg = RTE_MTR_SRTCM_RFC2697;
mp.srtcm_rfc2697.cir = res->cir;
mp.srtcm_rfc2697.cbs = res->cbs;
mp.srtcm_rfc2697.ebs = res->ebs;
@@ -277,7 +277,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
/* Private shaper profile params */
memset(&mp, 0, sizeof(struct rte_mtr_meter_profile));
- mp.alg = 0;
+ mp.alg = RTE_MTR_TRTCM_RFC2698;
mp.trtcm_rfc2698.cir = res->cir;
mp.trtcm_rfc2698.pir = res->pir;
mp.trtcm_rfc2698.cbs = res->cbs;
@@ -389,7 +389,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
/* Private shaper profile params */
memset(&mp, 0, sizeof(struct rte_mtr_meter_profile));
- mp.alg = 0;
+ mp.alg = RTE_MTR_TRTCM_RFC4115;
mp.trtcm_rfc4115.cir = res->cir;
mp.trtcm_rfc4115.eir = res->eir;
mp.trtcm_rfc4115.cbs = res->cbs;
--
2.7.4
next reply other threads:[~2017-12-22 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 16:32 Tomasz Duszynski [this message]
2018-01-03 10:30 ` Singh, Jasvinder
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=1513960357-26092-1-git-send-email-tdu@semihalf.com \
--to=tdu@semihalf.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/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).