> -----Original Message----- > From: Wu, Jingjing > Sent: Friday, October 13, 2017 7:32 AM > To: Dumitrescu, Cristian <cristian.dumitre...@intel.com>; dev@dpdk.org > Cc: tho...@monjalon.net; adrien.mazarg...@6wind.com; > hemant.agra...@nxp.com; jerin.ja...@caviumnetworks.com; Singh, > Jasvinder <jasvinder.si...@intel.com> > Subject: RE: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing > > > > > -----Original Message----- > > From: Dumitrescu, Cristian > > Sent: Friday, October 6, 2017 10:46 PM > > To: dev@dpdk.org > > Cc: tho...@monjalon.net; adrien.mazarg...@6wind.com; Wu, Jingjing > > <jingjing...@intel.com>; hemant.agra...@nxp.com; > > jerin.ja...@caviumnetworks.com; Singh, Jasvinder > <jasvinder.si...@intel.com> > > 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 <jasvinder.si...@intel.com> > > Acked-by: Cristian Dumitrescu <cristian.dumitre...@intel.com> > > Acked-by: Adrien Mazarguil <adrien.mazarg...@6wind.com> > > --- > > 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. > [......] > > > +cmdline_parse_token_num_t > cmd_add_port_meter_profile_srtcm_port_id = > > + 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