From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF02AA0A0C; Wed, 4 Aug 2021 18:46:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CAD94014F; Wed, 4 Aug 2021 18:46:38 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 354484003E for ; Wed, 4 Aug 2021 18:46:37 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 96EFA5C0118; Wed, 4 Aug 2021 12:46:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 04 Aug 2021 12:46:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= xkEzBfuwtgu4G8I8xUIuJig0UyWpGdNVYs/vGoVkOqQ=; b=mSrNAMA+9f4Z5UCD H9z4qgVcdR4aOb9SdQu31CQ0jmogke0+GcE9NugArrFp3vgvMj1IPOPFzv+2oejs YvTj8/x8llUcYa1n9dU+Dr5VjkyRvHbk1pXk6hjFxMbTKP0aY75XulO7eA86avAY YYeBCnzOGj545ludY9yJrXgrgsbhLZX8elBrJQtbjxk3amv8xrmyZrGSg9E0HIzJ mcGw44iivejQ3i6hHmMaSFASVAxpN5mFnOOqFBPrpfdhIvzhzTBnwE0/BIbJ+f4T CKfnw0tGiDeQjOS6SShAWAqgeawbi1H5sHIFedDlXHd/rLtzFTLaE3I0EW2Bb13D mt1L3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=xkEzBfuwtgu4G8I8xUIuJig0UyWpGdNVYs/vGoVkO qQ=; b=YEjfs0j2UMm2AneTSFkvmEPncevhbC4Lp91XXrofZew+BHijJYDHt2d+v ayKfUkP4t/GcSTsFBRfxv7ICGTqvLOezhWExb1m7qbvkhpfiA10GzER0jwHPgd6A E9ysFLrE9gLeS5LBsBN/kzWOtTuVYfeg8MzirKV5mHZdENmb/C+SAKnxe5haRUcm imsltLK1glnG6AgifMDdYnMaYe+rLfUj+W92jGbM0DOVVpEF7o7gs2T8jhyJSRHF EHIElpp1G3Zx/R/qZ9g4TyAVu0bBNSnsb8oOd7/hgmEZi7t3DyfGf3GxtZ4Cya3h /QNloznZHfMNYcHMyKayxoEgzR4kg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieejgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Aug 2021 12:46:34 -0400 (EDT) From: Thomas Monjalon To: Jerin Jacob Cc: Cristian Dumitrescu , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, lizh@nvidia.com, ajit.khaparde@broadcom.com, jasvinder.singh@intel.com, matan@nvidia.com Date: Wed, 04 Aug 2021 18:46:33 +0200 Message-ID: <2421437.SPqgGMI9PB@thomas> In-Reply-To: <20210804113410.3604616-1-jerinj@marvell.com> References: <20210718094400.2772435-1-jerinj@marvell.com> <20210804113410.3604616-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] doc: mtr: add API walk through X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 04/08/2021 13:34, jerinj@marvell.com: > --- a/doc/guides/prog_guide/traffic_metering_and_policing.rst > +++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst > @@ -14,12 +14,13 @@ SW or mixed HW-SW implementation. > > The main features are: > > -* Part of DPDK rte_ethdev API > -* Capability query API > -* Metering algorithms: RFC 2697 Single Rate Three Color Marker (srTCM), RFC 2698 > - and RFC 4115 Two Rate Three Color Marker (trTCM) > -* Policer actions (per meter output color): recolor, drop > -* Statistics (per policer output color) > +#. Part of DPDK rte_ethdev API > +#. Capability query API > +#. Metering algorithms: RFC 2697 Single Rate Three Color Marker (srTCM), RFC 2698 > + and RFC 4115 Two Rate Three Color Marker (trTCM) > +#. Policer actions (per meter output color): recolor, drop > +#. Statistics (per policer output color) > +#. Chaining the meter objects Why changing to numbered list? There is no specific order? [...] > +API Walk-through > +---------------- > + > +.. _figure_meter_components: This anchor is not used. Not needed I think. > + > +.. figure:: img/meter.* > + > + Meter components > + > +This section will introduce the reader to the critical APIs to use > +the traffic meter and policing library. > + > +In general, the following steps performed by the application to configure I think the verb "are" is missing. > +the traffic meter and policing library. > + > +#. Application gets the meter driver capabilities using ``rte_mtr_capabilities_get()``. > +#. Application identifies the profile(s) needed for metering and creates it with > + ``rte_mtr_meter_profile_add()``. > +#. Application identifies the policies needed and creates it with ``rte_mtr_meter_policy_add()``. > +#. An meter object consists of a profile and a policy. Use above created objects to create s/An/a/ > + meter object using ``rte_mtr_create()``. Application uses > + ``struct rte_mtr_params::meter_profile_id`` and ``struct rte_mtr_params::meter_policy_id`` > + to specify the profile(created in step 2) and policy(created in step 3). missing space before parentheseses. > +#. Once the meter object is created, the application shall use ``rte_flow_create()`` API to > + instantiate the meter object using ``RTE_FLOW_ACTION_TYPE_METER`` action. > +#. The API allows chaining the meter objects to create complex metering topology > + by specifying ``struct rte_mtr_meter_policy_params::actions`` as > + ``RTE_FLOW_ACTION_TYPE_METER`` the parent meter object. Not sure this last sentence is clear about what is the parent.