From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wu, Jingjing" Subject: Re: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing Date: Fri, 13 Oct 2017 06:32:07 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810E949C8@SHSMSX103.ccr.corp.intel.com> References: <1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com> <1507301136-131382-1-git-send-email-cristian.dumitrescu@intel.com> <1507301136-131382-6-git-send-email-cristian.dumitrescu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "thomas@monjalon.net" , "adrien.mazarguil@6wind.com" , "hemant.agrawal@nxp.com" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" To: "Dumitrescu, Cristian" , "dev@dpdk.org" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 721431B60F for ; Fri, 13 Oct 2017 08:32:11 +0200 (CEST) In-Reply-To: <1507301136-131382-6-git-send-email-cristian.dumitrescu@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----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 > ; hemant.agrawal@nxp.com; > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > Subject: [PATCH V3 5/5] app/testpmd: cli for traffic metering and policin= g >=20 > Add CLI commands to exercise the ethdev Traffic Metering and Policing > (MTR) API. >=20 > Signed-off-by: Jasvinder Singh > Acked-by: Cristian Dumitrescu > Acked-by: Adrien Mazarguil > --- > Changes in v3: > - Added newline at the end of cmdline_mtr.h >=20 > 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 >=20 > 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 :=3D testpmd.c > SRCS-y +=3D parameters.c > SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=3D cmdline.c > SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=3D cmdline_flow.c > +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=3D cmdline_mtr.c > SRCS-y +=3D config.c > SRCS-y +=3D iofwd.c > SRCS-y +=3D 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 > #endif > #include "testpmd.h" > +#include "cmdline_mtr.h" >=20 > static struct cmdline *testpmd_cl; >=20 > @@ -14334,6 +14335,15 @@ cmdline_parse_ctx_t main_ctx[] =3D { > (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. [......] > +cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_port_id =3D > + 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. Thanks Jingjing