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 DB9EBA0547; Sat, 7 Aug 2021 10:17:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D8C140691; Sat, 7 Aug 2021 10:17:16 +0200 (CEST) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by mails.dpdk.org (Postfix) with ESMTP id B33B34067E for ; Sat, 7 Aug 2021 10:17:14 +0200 (CEST) Received: by mail-io1-f53.google.com with SMTP id l20so14442840iom.4 for ; Sat, 07 Aug 2021 01:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GSASRX1DlxDAgHLHxncj9LUqgPOUNzpk7GDTHu0qWiw=; b=FL+ICWJS7m1CsBsccdQSWPqfPMspctHIsdKRtGaRbY2kjairXCx8AvgyWEGRZRQudB j8eNIFcC3LQ99q2vMWsOTYYlmhx204IB8GboYQ2vtMmGtGrowtMhty/Qqo8FJGUmSr0+ IOGJ4AyqbwITMF2IHcUIlQEpJ8Z1GZDk3xZtyjrPxcSlZPMW2uxfgUMjYQdhQWJkPz4f mkBCXWOjvwiATvo4vC58Y6fsE3nLzrJfbnM5Bqpm+j9l+aE70chTraaCf79zydJZEM98 mc+cxhim+ZMjyBRa5Cdv2w7feYszbVVPoy5nBpA+J5faG/A4jSbIQPw9EpdTYDq94ABH qZBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GSASRX1DlxDAgHLHxncj9LUqgPOUNzpk7GDTHu0qWiw=; b=c6sH2B1hqSc2eVgmpdZdJy0AZFXRGxJoo44e4VZ1ao23dX6zbGh3Q7FayrYGXespQb CZY+AIpVmh7XUCSnaypM61XytQZ/wHQ/dH14MfH4Sv5VFAS1bxB8AFDjFsZDzmiUYJM8 ovr3mTU6LsrX0WooakqbO7AEGYQfirp0n+gL2r+Khr42lWj8/HzMIuDpdxedFyHACZxf nn4rWFAY3SE2XwHIKOktkEnUaER2lnxr6Co2cwHy9+n4YW7idoaBCFxoWTyMFRXJzl6g R6iDFe4Jwrj6zusFXyEKBzULZ51udFo/85VTwQWbdxYt0+aWYonSiuY014cQoIAz2/vV IA0Q== X-Gm-Message-State: AOAM5335eI8qfQGWne+BXHHV+D/dBmrxx8hxH5xjGoxNIeYpaKH+XHUN IYt6ChjefSxJOjABhTT61iZsUFY7s2MGuGeYZ7s= X-Google-Smtp-Source: ABdhPJyFwm5hOCGh/NB5VwX6cWZ5R8ytzj3I0birQ4Tgy7jFlijrp7nMXu0yQ2xsmB9mBpSgBMm/2w6rY/auggfDr3k= X-Received: by 2002:a5d:9808:: with SMTP id a8mr8948iol.1.1628324234060; Sat, 07 Aug 2021 01:17:14 -0700 (PDT) MIME-Version: 1.0 References: <20210806094320.796914-1-jerinj@marvell.com> <20210806094518.807965-1-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Sat, 7 Aug 2021 13:46:47 +0530 Message-ID: To: "Dumitrescu, Cristian" Cc: "jerinj@marvell.com" , Thomas Monjalon , "Yigit, Ferruh" , Andrew Rybchenko , "dev@dpdk.org" , "arybchenko@solarflare.com" , "lizh@nvidia.com" , "ajit.khaparde@broadcom.com" , "Singh, Jasvinder" , "matan@nvidia.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [WARNING: UNSCANNABLE EXTRACTION FAILED][WARNING: UNSCANNABLE EXTRACTION FAILED] [PATCH v5] 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" On Fri, Aug 6, 2021 at 11:16 PM Dumitrescu, Cristian wrote: > > Hi Jerin, Hi Cristian, I will next version with your suggestions. > > > +API Walk-through > > +---------------- > > + > > +.. _figure_rte_mtr_chaining: > > + > > +.. figure:: img/rte_mtr_meter_chaining.* > > + > > + Meter components > > + > > +This section will introduce the reader to the critical APIs to use > > +the traffic meter and policing library. > > + > > +In general, the application performs the following steps to configure = the > > +traffic meter and policing library. > > + > > +#. Application gets the meter driver capabilities using > > ``rte_mtr_capabilities_get()``. > > +#. The application creates the required meter profiles by using the > > + ``rte_mtr_meter_profile_add()`` API function. > > +#. The application creates the required meter policies by using the > > + ``rte_mtr_meter_policy_add()`` API function. > > +#. One of the previously created meter profile > > + (``struct rte_mtr_params::meter_profile_id``) and meter policy > > + (``struct rte_mtr_params::meter_policy_id``) are provided as argume= nts > > + at this step. > > You somehow dropped the first statement from this last bullet: > > The application creates a meter object using the rte_mtr_create()= API function. > > > +#. The application enables the meter object execution as part of the f= low > > action > > + processing by calling the ``rte_flow_create()`` API function with o= ne of the > > + flow action set to ``RTE_FLOW_ACTION_TYPE_METER`` and the associate= d > > + meter object ID set to this meter object. > > +#. The API allows chaining the meter objects to create complex meterin= g > > topology > > + by the following methods. > > + > > + * Stacking multiple ``rte_flow_action`` as > > + ``RTE_FLOW_ACTION_TYPE_METER`` with ``struct > > rte_flow_action_meter::mtr_id`` > > + as meter ID. The last added RTE_FLOW_ACTION_TYPE_METER object > > represent as > > + leaf node (closest to ethdev receive queue) > > + > > Stacking might point people to reverse order execution of actions, which = is not the case, as the flow actions are executed sequentially from first t= o last. Also the last meter action is not the last flow action (your refere= nce to leaf node?), as the last flow action must be the END action, right? > > How about: > * Adding multiple flow actions of the type ``RTE_FLOW_ACTION_TYPE= _METER`` to the same flow. Each of the meter action typically refers to a d= ifferent meter object. > > I was suggesting a similar diagram for this case, but it might be too muc= h to ask for :) > > > + * As show in :numref:`figure_rte_mtr_chaining` specify > > + ``struct rte_mtr_meter_policy_params::actions`` action as > > + ``RTE_FLOW_ACTION_TYPE_METER`` per color. > > I would add a high level statement before yours, something like: > * Adding one (or multiple) actions of the type ``RTE_FLOW_ACTION_= TYPE_METER`` to the list of meter actions specified per color. > > Regards, > Cristian