From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PPfw9u/uYboChP251Rf1O9cW3mUMWoZYkeFr+EX7Go4=; b=gbJJeaeGj0PWLQ6VFwxMYMkPEcM9YsqPj4pCskRYvxK+PhSuCwpcehy1vZXDBV36j7 mcpy54loB7BLUO8rFWh/nUieVQG5/FBm04FlF/IzbYOQrAIELJigiZFZcSTfHklBJnga XRBdkm7aWWuIAkj1q00et6foy7yLK7vF+PlZZqllQGuASIkbHffv3FxsWfyO/kpVm6Il /fppBiBX2WeMompS7c1FK1h5yWNGFADGaSz1v0/zTVc0KQQ4woSFZ0ouZGhIDHxjugcy VEFyv8TR+1a07wQt9QofNRKIqOfkbzkjr9iiZDTMozC1yKLSXugQjzYg7dTWNuptwB3j ah5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PPfw9u/uYboChP251Rf1O9cW3mUMWoZYkeFr+EX7Go4=; b=OsHl8rHMK5hp+cqmPapeDVOASygZzPMD44UCjHl5Tv4yzmNm356ZzNwGcanJPhe3jW 4yR+qttAd/VLjvUWS+sQ6E0mq7f9YRm0AQkripT8tt04UqhkPzUyy1iPYhWYsxlYuxjF 2PKu2UrQK8X1Kpa38Ia7IP9fP4og4v+AIUADNVpshwpiMrO8v/+IBMvepE/evfcDie2f PNwUkLEGft43fk8GDNLqAQAaPA4rMft5HsoOX1lpZgQyOJSlIKt8aRG3eyklBrS5zt55 0HWmI6f7fhEdxwSJ1WY/q2pe4qy1kWNcOQhyQTK8ljqdU0snGg4tfpeXcJXFt2VItzoh wghA== X-Gm-Message-State: AMCzsaXWOMNguoCMUHtivHlLFUx00GVX8bLOHI0C3lYjKM3jV65X1HJ2 7upuZ5PjsbSN1LSZTgTKqZfR8Q== X-Google-Smtp-Source: AOwi7QC7Sm8FyAavwUWCZvRn7YGsTSjgwOm8UrJFdU57buyDELAjpBs9X/uCqcdHgIv3a1WtiuWTrQ== X-Received: by 10.80.139.65 with SMTP id l59mr3453944edl.187.1507298301211; Fri, 06 Oct 2017 06:58:21 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id j6sm1582635edj.58.2017.10.06.06.58.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 06:58:20 -0700 (PDT) Date: Fri, 6 Oct 2017 15:58:10 +0200 From: Adrien Mazarguil To: Cristian Dumitrescu Cc: dev@dpdk.org, thomas@monjalon.net, jingjing.wu@intel.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, jasvinder.singh@intel.com 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 Content-Disposition: inline In-Reply-To: <1507208974-180500-6-git-send-email-cristian.dumitrescu@intel.com> Subject: Re: [dpdk-dev] [PATCH V2 5/5] app/testpmd: cli for traffic metering and policing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2017 13:58:21 -0000 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