From: Ori Kam <orika@nvidia.com>
To: Alexander Kozyrev <akozyrev@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
"ivan.malov@oktetlabs.ru" <ivan.malov@oktetlabs.ru>,
"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
"mohammad.abdul.awal@intel.com" <mohammad.abdul.awal@intel.com>,
"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>,
"jerinj@marvell.com" <jerinj@marvell.com>,
"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
"bruce.richardson@intel.com" <bruce.richardson@intel.com>
Subject: RE: [PATCH v2 1/4] ethdev: add meter color flow matching item
Date: Thu, 26 May 2022 12:16:31 +0000 [thread overview]
Message-ID: <MW2PR12MB46666B73E531F5AE2FBDE102D6D99@MW2PR12MB4666.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220522105102.1692526-2-akozyrev@nvidia.com>
Hi Alexander,
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Sunday, May 22, 2022 1:51 PM
> Subject: [PATCH v2 1/4] ethdev: add meter color flow matching item
>
> Provide an ability to use a Color Marker set by a Meter
> as a matching item in Flow API. The Color Marker reflects
> the metering result by setting the metadata for a
> packet to a particular codepoint: green, yellow or red.
>
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> ---
> doc/guides/prog_guide/rte_flow.rst | 7 +++++++
> doc/guides/rel_notes/release_22_07.rst | 4 ++++
> lib/ethdev/rte_flow.c | 1 +
> lib/ethdev/rte_flow.h | 24 ++++++++++++++++++++++++
> 4 files changed, 36 insertions(+)
>
> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
> index 588914b231..018def1033 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -1651,6 +1651,13 @@ Matches a PPP header.
> - ``proto_id``: PPP protocol identifier.
> - Default ``mask`` matches addr, ctrl, proto_id.
>
> +Item: ``METER_COLOR``
> +^^^^^^^^^^^^^^^^^^^^^
> +
> +Matches Color Marker set by a Meter.
> +
> +- ``color``: Metering color marker.
> +
> Actions
> ~~~~~~~
>
> diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
> index 0ed4f92820..c1804bc74f 100644
> --- a/doc/guides/rel_notes/release_22_07.rst
> +++ b/doc/guides/rel_notes/release_22_07.rst
> @@ -69,6 +69,10 @@ New Features
> Added an API which can get the number of in-flight packets in
> vhost async data path without using lock.
>
> +* **Extended Metering and Marking support in the Flow API.**
> +
> + * Added METER_COLOR item to match Color Marker set by a Meter.
> +
> * **Updated Intel iavf driver.**
>
> * Added Tx QoS queue rate limitation support.
> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
> index 2c35a2f13e..07d7e998c0 100644
> --- a/lib/ethdev/rte_flow.c
> +++ b/lib/ethdev/rte_flow.c
> @@ -161,6 +161,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
> rte_flow_item_flex_conv),
> MK_FLOW_ITEM(L2TPV2, sizeof(struct rte_flow_item_l2tpv2)),
> MK_FLOW_ITEM(PPP, sizeof(struct rte_flow_item_ppp)),
> + MK_FLOW_ITEM(METER_COLOR, sizeof(struct rte_flow_item_meter_color)),
> };
>
> /** Generate flow_action[] entry. */
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index d8827dd184..75ec6621ac 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -671,6 +671,14 @@ enum rte_flow_item_type {
> * See struct rte_flow_item_gre_opt.
> */
> RTE_FLOW_ITEM_TYPE_GRE_OPTION,
> +
> + /**
> + * Matches Meter Color Marker.
> + *
> + * See struct rte_flow_item_meter_color.
> + */
> +
> + RTE_FLOW_ITEM_TYPE_METER_COLOR,
> };
>
> /**
> @@ -2201,6 +2209,22 @@ struct rte_flow_item_flex_conf {
> uint32_t nb_outputs;
> };
>
> +/**
> + * RTE_FLOW_ITEM_TYPE_METER_COLOR.
> + *
> + * Matches Color Marker set by a Meter.
> + */
> +struct rte_flow_item_meter_color {
> + enum rte_color color; /**< Meter color marker. */
> +};
> +
> +/** Default mask for RTE_FLOW_ITEM_TYPE_METER_COLOR. */
> +#ifndef __cplusplus
> +static const struct rte_flow_item_meter_color rte_flow_item_meter_color_mask = {
> + .color = RTE_COLORS,
> +};
> +#endif
> +
> /**
> * Action types.
> *
> --
> 2.18.2
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
next prev parent reply other threads:[~2022-05-26 12:16 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 2:46 [RFC] ethdev: datapath-focused meter actions Alexander Kozyrev
2022-04-08 8:21 ` Jerin Jacob
2022-04-26 13:43 ` Dumitrescu, Cristian
2022-04-26 13:45 ` Dumitrescu, Cristian
2022-05-02 19:12 ` Alexander Kozyrev
2022-05-02 20:02 ` [PATCH v2 0/3] " Alexander Kozyrev
2022-05-02 20:04 ` [RFC " Alexander Kozyrev
2022-05-02 20:04 ` [PATCH v2 1/3] ethdev: add meter color matching to Flow API Alexander Kozyrev
2022-05-02 20:04 ` [PATCH v2 2/3] ethdev: allow meter color modification Alexander Kozyrev
2022-05-02 20:04 ` [PATCH v2 3/3] ethdev: add extended meter action to Flow API Alexander Kozyrev
2022-05-18 4:34 ` [PATCH 0/4] ethdev: separate metering and marking from policing Alexander Kozyrev
2022-05-18 4:34 ` [PATCH 1/4] ethdev: add meter color flow matching item Alexander Kozyrev
2022-05-19 14:44 ` Dumitrescu, Cristian
2022-05-18 4:34 ` [PATCH 2/4] ethdev: allow meter color marker modification Alexander Kozyrev
2022-05-19 14:49 ` Dumitrescu, Cristian
2022-05-24 12:19 ` Alexander Kozyrev
2022-05-18 4:34 ` [PATCH 3/4] ethdev: add meter profile config calculation Alexander Kozyrev
2022-05-19 14:55 ` Dumitrescu, Cristian
2022-05-24 12:36 ` Alexander Kozyrev
2022-05-18 4:34 ` [PATCH 4/4] ethdev: add meter color mark flow action Alexander Kozyrev
2022-05-22 10:50 ` [PATCH v2 0/4] ethdev: separate metering and marking from policing Alexander Kozyrev
2022-05-22 10:50 ` [PATCH v2 1/4] ethdev: add meter color flow matching item Alexander Kozyrev
2022-05-26 12:16 ` Ori Kam [this message]
2022-05-22 10:51 ` [PATCH v2 2/4] ethdev: allow meter color marker modification Alexander Kozyrev
2022-05-26 12:21 ` Ori Kam
2022-05-22 10:51 ` [PATCH v2 3/4] ethdev: get meter profile/policy objects Alexander Kozyrev
2022-05-26 12:27 ` Ori Kam
2022-06-01 3:33 ` Alexander Kozyrev
2022-05-22 10:51 ` [PATCH v2 4/4] ethdev: add meter color mark flow action Alexander Kozyrev
2022-05-26 12:33 ` Ori Kam
2022-06-01 3:35 ` Alexander Kozyrev
2022-05-26 12:35 ` [PATCH v2 0/4] ethdev: separate metering and marking from policing Ori Kam
2022-05-26 13:21 ` Jerin Jacob
2022-05-26 13:22 ` Jerin Jacob
2022-06-01 3:19 ` Alexander Kozyrev
2022-06-01 3:44 ` [PATCH v3 0/7] " Alexander Kozyrev
2022-06-01 3:44 ` [PATCH v3 1/7] ethdev: add meter color flow matching item Alexander Kozyrev
2022-06-01 8:44 ` Ori Kam
2022-06-09 12:18 ` Andrew Rybchenko
2022-06-01 3:44 ` [PATCH v3 2/7] ethdev: allow meter color marker modification Alexander Kozyrev
2022-06-01 8:45 ` Ori Kam
2022-06-09 12:18 ` Andrew Rybchenko
2022-06-01 3:44 ` [PATCH v3 3/7] ethdev: get meter profile/policy objects Alexander Kozyrev
2022-06-01 8:51 ` Ori Kam
2022-06-09 12:18 ` Andrew Rybchenko
2022-06-01 3:44 ` [PATCH v3 4/7] ethdev: add meter color mark flow action Alexander Kozyrev
2022-06-01 8:55 ` Ori Kam
2022-06-09 12:19 ` Andrew Rybchenko
2022-06-01 3:44 ` [PATCH v3 5/7] app/testpmd: add meter color flow matching item Alexander Kozyrev
2022-06-01 8:59 ` Ori Kam
2022-06-01 3:44 ` [PATCH v3 6/7] app/testpmd: allow meter color marker modification Alexander Kozyrev
2022-06-01 8:59 ` Ori Kam
2022-06-01 3:44 ` [PATCH v3 7/7] app/testpmd: add meter color mark flow action Alexander Kozyrev
2022-06-01 9:01 ` Ori Kam
2022-06-08 11:41 ` [PATCH v3 0/7] ethdev: separate metering and marking from policing Dumitrescu, Cristian
2022-09-21 2:11 ` [PATCH v4 " Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 1/7] ethdev: add meter color flow matching item Alexander Kozyrev
2022-09-21 12:54 ` Ori Kam
2022-09-21 2:11 ` [PATCH v4 2/7] ethdev: allow meter color marker modification Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 3/7] ethdev: get meter profile/policy objects Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 4/7] ethdev: add meter color mark flow action Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 5/7] app/test-pmd: add meter color flow matching item Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 6/7] app/test-pmd: allow meter color marker modification Alexander Kozyrev
2022-09-21 2:11 ` [PATCH v4 7/7] app/testpmd: add meter color mark flow action Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 0/7] ethdev: separate metering and marking from policing Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 1/7] ethdev: add meter color flow matching item Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 2/7] ethdev: allow meter color marker modification Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 3/7] ethdev: get meter profile/policy objects Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 4/7] ethdev: add meter color mark flow action Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 5/7] app/testpmd: add meter color flow matching item Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 6/7] app/testpmd: allow meter color marker modification Alexander Kozyrev
2022-09-26 14:57 ` [PATCH v5 7/7] app/testpmd: add meter color mark flow action Alexander Kozyrev
2022-09-27 11:56 ` [PATCH v5 0/7] ethdev: separate metering and marking from policing Dumitrescu, Cristian
2022-09-28 6:45 ` Ori Kam
2022-09-28 16:38 ` Ajit Khaparde
2022-09-29 7:51 ` Andrew Rybchenko
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=MW2PR12MB46666B73E531F5AE2FBDE102D6D99@MW2PR12MB4666.namprd12.prod.outlook.com \
--to=orika@nvidia.com \
--cc=ajit.khaparde@broadcom.com \
--cc=akozyrev@nvidia.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=ivan.malov@oktetlabs.ru \
--cc=jerinj@marvell.com \
--cc=mohammad.abdul.awal@intel.com \
--cc=qi.z.zhang@intel.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).