From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 72EFC236 for ; Tue, 19 Sep 2017 18:36:55 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2017 09:36:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,418,1500966000"; d="scan'208";a="1221007452" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 19 Sep 2017 09:36:51 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 19 Sep 2017 17:36:51 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by irsmsx155.ger.corp.intel.com ([169.254.14.70]) with mapi id 14.03.0319.002; Tue, 19 Sep 2017 17:36:50 +0100 From: "Dumitrescu, Cristian" To: Adrien Mazarguil CC: "dev@dpdk.org" , "thomas@monjalon.net" , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" Thread-Topic: [PATCH 3/3] rte_flow: add new action for traffic metering and policing Thread-Index: AQHTJyyaREYSZ1ptWEi6bCtLR0sUI6K8eLOw Date: Tue, 19 Sep 2017 16:36:50 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BABC13D@IRSMSX108.ger.corp.intel.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> <20170906162302.GD4301@6wind.com> In-Reply-To: <20170906162302.GD4301@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/3] rte_flow: add new action 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: Tue, 19 Sep 2017 16:36:56 -0000 Hi Adrien, > -----Original Message----- > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > Sent: Wednesday, September 6, 2017 5:23 PM > To: Dumitrescu, Cristian > Cc: dev@dpdk.org; thomas@monjalon.net; > jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com > Subject: Re: [PATCH 3/3] rte_flow: add new action for traffic metering an= d > policing >=20 > Hi Cristian, >=20 > This commit should probably come first in the series since the rest relie= s > on it, right? >=20 Yes, will do in V2. > Subject line does not conform past commits, it should start with "ethdev:= " > and not mention "rte_flow" (use "flow API"). >=20 Yes, sir! > On Sat, Aug 26, 2017 at 01:06:13AM +0100, Cristian Dumitrescu wrote: > > Signed-off-by: Cristian Dumitrescu >=20 > 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. >=20 Yes, will add here the relevant description, which is currently only in the= cover letter. > More comments below. >=20 > > --- > > 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 pass= ed > 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(). > */ > > +}; > > + >=20 > Default mask definition is missing. >=20 I do not understand this comment. This is a flow action, not a flow item (t= hat might be a packet field with an associated mask); this mtr_id is simila= r to queue ID/index/VF ID from other flow actions, none having any mask att= ached. Adrien, can you please clarify? > > +/** > > * Definition of a single action. > > * > > * A list of actions is terminated by a END action. > > -- > > 2.7.4 > > >=20 > Even if MTR is a separate API, please add to this commit: >=20 > - 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 >=20 > You can find examples in previous commits related to rte_flow. >=20 All of these items are a must and will get done, but do they have to be don= e in the same patch set? My plan was to introduce test-pmd updates through separate patch sets after= the API is accepted. I know you had these items done in the same patch set= for rte_flow, but there are other APIs such as eventdev and ethdev traffic= management which introduced sample app one release later. > -- > Adrien Mazarguil > 6WIND Regards, Cristian