From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH V2 5/5] app/testpmd: cli for traffic metering and policing Date: Fri, 6 Oct 2017 15:58:10 +0200 Message-ID: <20171006135810.GE3871@6wind.com> References: <1503705973-80742-2-git-send-email-cristian.dumitrescu@intel.com> <1507208974-180500-1-git-send-email-cristian.dumitrescu@intel.com> <1507208974-180500-6-git-send-email-cristian.dumitrescu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, thomas@monjalon.net, jingjing.wu@intel.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, jasvinder.singh@intel.com To: Cristian Dumitrescu Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id BB7FE1B1F9 for ; Fri, 6 Oct 2017 15:58:21 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id m72so7813394wmc.1 for ; Fri, 06 Oct 2017 06:58:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1507208974-180500-6-git-send-email-cristian.dumitrescu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Oct 05, 2017 at 02:09:34PM +0100, Cristian Dumitrescu wrote: > Add CLI commands to exercise the ethdev Traffic Metering and Policing > (MTR) API. > > Signed-off-by: Jasvinder Singh > Acked-by: Cristian Dumitrescu I can't comment most of these changes, however for the part related to the flow command: > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index a17a004..f210ce5 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -194,6 +194,8 @@ enum index { > ACTION_VF, > ACTION_VF_ORIGINAL, > ACTION_VF_ID, > + ACTION_METER, > + ACTION_METER_ID, > }; > > /** Size of pattern[] field in struct rte_flow_item_raw. */ > @@ -601,6 +603,7 @@ static const enum index next_action[] = { > ACTION_RSS, > ACTION_PF, > ACTION_VF, > + ACTION_METER, > ZERO, > }; > > @@ -635,6 +638,12 @@ static const enum index action_vf[] = { > ZERO, > }; > > +static const enum index action_meter[] = { > + ACTION_METER_ID, > + ACTION_NEXT, > + ZERO, > +}; > + > static int parse_init(struct context *, const struct token *, > const char *, unsigned int, > void *, unsigned int); > @@ -1566,6 +1575,21 @@ static const struct token token_list[] = { > .args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)), > .call = parse_vc_conf, > }, > + [ACTION_METER] = { > + .name = "meter", > + .help = "meter the directed packets at given id", > + .priv = PRIV_ACTION(METER, > + sizeof(struct rte_flow_action_meter)), > + .next = NEXT(action_meter), > + .call = parse_vc, > + }, > + [ACTION_METER_ID] = { > + .name = "mtr_id", > + .help = "meter id to use", > + .next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)), > + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)), > + .call = parse_vc_conf, > + }, > }; Acked-by: Adrien Mazarguil One remaining minor comment: > diff --git a/app/test-pmd/cmdline_mtr.h b/app/test-pmd/cmdline_mtr.h > +#endif /* _CMDLINE_MTR_H_ */ > \ No newline at end of file Make sure to add this missing new line for the next iteration. -- Adrien Mazarguil 6WIND