DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "jerinj@marvell.com" <jerinj@marvell.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"lizh@nvidia.com" <lizh@nvidia.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"matan@nvidia.com" <matan@nvidia.com>
Subject: Re: [dpdk-dev] [WARNING: UNSCANNABLE EXTRACTION FAILED][WARNING: UNSCANNABLE EXTRACTION FAILED] [PATCH v5] doc: mtr: add API walk through
Date: Fri, 6 Aug 2021 17:46:25 +0000	[thread overview]
Message-ID: <DM8PR11MB5670A5090FA5747556E22F1CEBF39@DM8PR11MB5670.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210806094518.807965-1-jerinj@marvell.com>

Hi Jerin,

> +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 arguments
> +   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 flow
> action
> +   processing by calling the ``rte_flow_create()`` API function with one of the
> +   flow action set to ``RTE_FLOW_ACTION_TYPE_METER`` and the associated
> +   meter object ID set to this meter object.
> +#. The API allows chaining the meter objects to create complex metering
> 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 to last. Also the last meter action is not the last flow action (your reference 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 different meter object.

I was suggesting a similar diagram for this case, but it might be too much 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

  reply	other threads:[~2021-08-06 17:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-18  9:44 [dpdk-dev] [PATCH] " jerinj
2021-07-27 11:21 ` Jerin Jacob
2021-08-04 11:34 ` [dpdk-dev] [PATCH v2] " jerinj
2021-08-04 16:46   ` Thomas Monjalon
2021-08-05 10:10   ` [dpdk-dev] [PATCH v3] " jerinj
2021-08-05 11:05     ` [dpdk-dev] [WARNING: UNSCANNABLE EXTRACTION FAILED][WARNING: UNSCANNABLE EXTRACTION FAILED] " Dumitrescu, Cristian
2021-08-05 12:32       ` Jerin Jacob
2021-08-05 22:17         ` Dumitrescu, Cristian
2021-08-06  8:49           ` Jerin Jacob
2021-08-06  9:43     ` [dpdk-dev] " jerinj
2021-08-06  9:45       ` [dpdk-dev] [PATCH v5] " jerinj
2021-08-06 17:46         ` Dumitrescu, Cristian [this message]
2021-08-07  8:16           ` [dpdk-dev] [WARNING: UNSCANNABLE EXTRACTION FAILED][WARNING: UNSCANNABLE EXTRACTION FAILED] " Jerin Jacob
2021-08-07  8:21         ` [dpdk-dev] [PATCH v6] " jerinj
2021-08-09  8:37           ` [dpdk-dev] [WARNING: UNSCANNABLE EXTRACTION FAILED][WARNING: UNSCANNABLE EXTRACTION FAILED] " Dumitrescu, Cristian
2021-11-26 13:45             ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM8PR11MB5670A5090FA5747556E22F1CEBF39@DM8PR11MB5670.namprd11.prod.outlook.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=lizh@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).