From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH 3/3] rte_flow: add new action for traffic metering and policing Date: Wed, 6 Sep 2017 18:23:02 +0200 Message-ID: <20170906162302.GD4301@6wind.com> References: <1496162653-137817-3-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-1-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-4-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, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com To: Cristian Dumitrescu Return-path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id CD3677CA3 for ; Wed, 6 Sep 2017 18:23:19 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id y15so14843402wrc.2 for ; Wed, 06 Sep 2017 09:23:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1503705973-80742-4-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" Hi Cristian, This commit should probably come first in the series since the rest relies on it, right? Subject line does not conform past commits, it should start with "ethdev:" and not mention "rte_flow" (use "flow API"). On Sat, Aug 26, 2017 at 01:06:13AM +0100, Cristian Dumitrescu wrote: > Signed-off-by: Cristian Dumitrescu A short description of what this new item does and why it's added is necessary. Context provided by the rest of the series will not always be available. More comments below. > --- > lib/librte_ether/rte_flow.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index bba6169..5569a87 100644 > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > @@ -915,6 +915,14 @@ enum rte_flow_action_type { > * See struct rte_flow_action_vf. > */ > RTE_FLOW_ACTION_TYPE_VF, > + > + /** > + * Traffic metering and policing (MTR). > + * > + * See struct rte_flow_action_meter. > + * See file rte_mtr.h for MTR object configuration. > + */ > + RTE_FLOW_ACTION_TYPE_METER, > }; > > /** > @@ -1008,6 +1016,20 @@ struct rte_flow_action_vf { > }; > > /** > + * RTE_FLOW_ACTION_TYPE_METER > + * > + * Traffic metering and policing (MTR). > + * > + * Packets matched by items of this type can be either dropped or passed to the > + * next item with their color set by the MTR object. > + * > + * Non-terminating by default. > + */ > +struct rte_flow_action_meter { > + uint32_t mtr_id; /**< MTR object ID created with rte_mtr_create(). */ > +}; > + Default mask definition is missing. > +/** > * Definition of a single action. > * > * A list of actions is terminated by a END action. > -- > 2.7.4 > Even if MTR is a separate API, please add to this commit: - Documentation update: guides/prog_guide/rte_flow.rst - Testpmd update: app/test-pmd/cmdline_flow.c - Testpmd documentation update: doc/guides/testpmd_app_ug/testpmd_funcs.rst You can find examples in previous commits related to rte_flow. -- Adrien Mazarguil 6WIND