From: Jerin Jacob <jerinjacobk@gmail.com>
To: Alexander Kozyrev <akozyrev@nvidia.com>
Cc: dpdk-dev <dev@dpdk.org>, Ori Kam <orika@nvidia.com>,
Thomas Monjalon <thomas@monjalon.net>,
Ivan Malov <ivan.malov@oktetlabs.ru>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Ferruh Yigit <ferruh.yigit@intel.com>,
"Awal, Mohammad Abdul" <mohammad.abdul.awal@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Jerin Jacob <jerinj@marvell.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [PATCH v2 0/4] ethdev: separate metering and marking from policing
Date: Thu, 26 May 2022 18:52:40 +0530 [thread overview]
Message-ID: <CALBAE1OUuRqbMXmmFRuMaCAbn33tFm-hgBFqVQpwga==aJu_SA@mail.gmail.com> (raw)
In-Reply-To: <CALBAE1MsTb1fEZm5iOMWyWx0_zbSodko2op2EQfPVHXMcvorng@mail.gmail.com>
On Thu, May 26, 2022 at 6:51 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Sun, May 22, 2022 at 4:21 PM Alexander Kozyrev <akozyrev@nvidia.com> wrote:
> >
> > Extend Metering and Marking support in the Flow API:
> > 1. Add METER_COLOR item to match Color Marker set by a Meter.
> > 2. Add the ability to set Color Marker via modify_field Flow API.
> > 3. Add Meter API to get profile/policy objects.
> > 4. Add METER_MARK action to perform Meter color metering and marking.
> > Provide greater flexibility in how Metering can be used.
> >
> > RFC: https://patchwork.dpdk.org/project/dpdk/cover/20220502200439.4100965-1-akozyrev@nvidia.com/
> >
> > Traditional Meter Usage:
> >
> > profile_id = rte_mtr_meter_profile_add(RFC_params);
> > policy_id = rte_mtr_meter_policy_add(actions[RED/YELLOW/GREEN]);
> > meter_id = rte_mtr_create(profile_id, policy_id);
> > rte_flow_create(pattern=5-tuple,actions=METER(meter_id));
> >
> > The METER action effectively translates to the following:
> > 1. Metering a packet stream.
> > 2. Marking packets with an appropriate color.
> > 3. Jump to a policy group.
> > 4. Match on a color.
> > 5. Execute assigned policy actions for the color.
> >
> > New Meter Usage Model:
> > profile_id = rte_mtr_meter_profile_add(RFC_params);
> > *profile_obj_ptr = rte_mtr_meter_profile_get(profile_id);
> > rte_flow_create(pattern=5-tuple,
> > actions=METER(profile_obj_ptr),JUMP);
> > rte_flow_create(pattern=COLOR, actions=...);
> >
> > The METER_MARK action effectively translates to the following:
> > 1. Metering a packet stream.
> > 2. Marking packets with an appropriate color.
> >
> > A user is able to match the color later with the COLOR item.
> > In order to do this we add the JUMP action after the METER action.
> >
> > 3. Jump to a policy group.
> > 4. Match on a color.
> > 5. Execute actions for the color.
> >
> > Here we decoupled the meter profile usage from the meter policy usage
> > for greater flexibility and got rid of any locks related to meter_id lookup.
> >
> > Another example of the meter creation to mimic the old model entirely:
> > profile_id = rte_mtr_meter_profile_add(RFC_params);
> > *profile_obj_ptr = rte_mtr_meter_profile_get(profile_id);
> > policy_id = rte_mtr_meter_policy_add(actions[RED/YELLOW/GREEN]);
> > *policy_obj_ptr = rte_mtr_meter_policy_get(policy_id);
> > rte_flow_create(pattern=5-tuple,
> > actions=METER(profile_obj_ptr, policy_obj_ptr));
> >
> > In this case, we define the policy actions right away.
> > The main advantage is not having to lookup for profile_id/policy_id.
> >
> > To free the meter obects we need to do the following:
> > rte_flow_destroy(flow_handle);
> > rte_mtr_meter_policy_delete(policy_id);
> > rte_mtr_meter_profile_delete(profile_id);.
> > profile_obj_ptr and policy_obj_ptr are no longer valid after that.
>
> The overall approach looks good to me.
>
> Could you update
> doc/guides/prog_guide/traffic_metering_and_policing.rst for the new
> scheme.
> I think, we need to add "struct rte_mtr_capabilities" one more filed
> for the capability for the application to
> query to pick one way or another or both.
Also, I think, the driver patches need to submit and merge before rc2 to
avoid the case where there is no single implementation for API.
next prev parent reply other threads:[~2022-05-26 13:23 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
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 [this message]
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='CALBAE1OUuRqbMXmmFRuMaCAbn33tFm-hgBFqVQpwga==aJu_SA@mail.gmail.com' \
--to=jerinjacobk@gmail.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=orika@nvidia.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).