Thread (64 messages) 64 messages, 7 authors, 2017-10-20

Re: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing

From: Dumitrescu, Cristian <hidden>
Date: 2017-10-13 12:30:34

-----Original Message-----
From: Wu, Jingjing
Sent: Friday, October 13, 2017 7:32 AM
To: Dumitrescu, Cristian <redacted>; dev@dpdk.org
Cc: thomas@monjalon.net; adrien.mazarguil@6wind.com;
hemant.agrawal@nxp.com; jerin.jacob@caviumnetworks.com; Singh,
Jasvinder [off-list ref]
Subject: RE: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing


quoted
-----Original Message-----
From: Dumitrescu, Cristian
Sent: Friday, October 6, 2017 10:46 PM
To: dev@dpdk.org
Cc: thomas@monjalon.net; adrien.mazarguil@6wind.com; Wu, Jingjing
[off-list ref]; hemant.agrawal@nxp.com;
jerin.jacob@caviumnetworks.com; Singh, Jasvinder
[off-list ref]
quoted
Subject: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing

Add CLI commands to exercise the ethdev Traffic Metering and Policing
(MTR) API.

Signed-off-by: Jasvinder Singh <redacted>
Acked-by: Cristian Dumitrescu <redacted>
Acked-by: Adrien Mazarguil <redacted>
---
Changes in v3:
- Added newline at the end of cmdline_mtr.h

 app/test-pmd/Makefile       |    1 +
 app/test-pmd/cmdline.c      |   10 +
 app/test-pmd/cmdline_flow.c |   24 +
 app/test-pmd/cmdline_mtr.c  | 1013
+++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/cmdline_mtr.h  |   49 +++
 5 files changed, 1097 insertions(+)
 create mode 100644 app/test-pmd/cmdline_mtr.c  create mode 100644
app/test-pmd/cmdline_mtr.h
diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index
c36be19..8fb6491 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -48,6 +48,7 @@ SRCS-y := testpmd.c
 SRCS-y += parameters.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_flow.c
+SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_mtr.c
 SRCS-y += config.c
 SRCS-y += iofwd.c
 SRCS-y += macfwd.c
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
ccdf239..8338b5c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -99,6 +99,7 @@
 #include <rte_pmd_bnxt.h>
 #endif
 #include "testpmd.h"
+#include "cmdline_mtr.h"

 static struct cmdline *testpmd_cl;
@@ -14334,6 +14335,15 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_hash_input_set,
 	(cmdline_parse_inst_t *)&cmd_set_fdir_input_set,
 	(cmdline_parse_inst_t *)&cmd_flow,
+	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
+	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
+	(cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
+	(cmdline_parse_inst_t *)&cmd_set_port_meter,
+	(cmdline_parse_inst_t *)&cmd_del_port_meter,
+	(cmdline_parse_inst_t *)&cmd_set_port_meter_profile,
+	(cmdline_parse_inst_t *)&cmd_set_port_meter_policer_action,
+	(cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,
+	(cmdline_parse_inst_t *)&cmd_show_port_meter_stats,
 	(cmdline_parse_inst_t *)&cmd_mcast_addr,
 	(cmdline_parse_inst_t *)&cmd_config_l2_tunnel_eth_type_all,
 	(cmdline_parse_inst_t
*)&cmd_config_l2_tunnel_eth_type_specific,

You need to add the command description in cmd_help_long_parsed.
And doc for new commands.
Done in V4 just sent.
[......]
quoted
+cmdline_parse_token_num_t
cmd_add_port_meter_profile_srtcm_port_id =
quoted
+	TOKEN_NUM_INITIALIZER(
+		struct cmd_add_port_meter_profile_srtcm_result,
+			port_id, UINT8);
Would you update the UINT8 to UINT16?  The same to all the port_id.
Done in V4 just sent.
Thanks
Jingjing
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help