All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, adrien.mazarguil@6wind.com,
	jingjing.wu@intel.com, hemant.agrawal@nxp.com,
	jerin.jacob@caviumnetworks.com, jasvinder.singh@intel.com
Subject: [PATCH V3 0/5] rte_mtr: generic ethdev api for metering and policing
Date: Fri,  6 Oct 2017 15:45:31 +0100	[thread overview]
Message-ID: <1507301136-131382-1-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com>

This patch set introduces an ethdev-based generic API for Traffic
Metering and Policing (MTR), which is yet another standard RX offload for
Ethernet devices.

Similar to rte_flow and rte_tm APIs, the configuration of MTR objects is
done in their own namespace (rte_mtr) within the librte_ether library.
Metering and policing action typically sits on top of flow classification,
which is why MTR objects are enabled through a newly introduced flow
action, which is the only impact to flow API.

Q1: Why introduce ethdev-based traffic metering ad policing API?
A1: Traffic metering and policing is a standard RX offload for Ethernet
devices present in NICs, SoCs and NPUs across the industry.

Q2: What's the connection between the new rte_mtr API and the existing
librte_meter library?
A2: The existing librte_meter library provides a SW implementation for a
subset of the features exposed by this API. The rte_mtr API is agnostic to
whether the implementation is HW, SW or mixed HW-SW.

Q3: What's the connection between the new rte_mtr API and the existing
flow API?
A3: The MTR object is hooked into ethdev RX processing path using a newly
introduced flow action, which is the only impact to the flow API.
The configuration of MTR objects is done in separate namespace (rte_mtr)
outside of flow API.

Q4: Can the new flow API meter action drop packets? Is this a terminating
action or not?
A4: Although packets can be dropped by the newly introduced flow API meter
action, this action is non-terminating, i.e. the action list typically
contains at least one more action, which is a terminating action.
Depending on the policer actions configured for the MTR object, some
packets might be dropped while some packets passed to the next flow action
with their color set in the packet mbuf. For example, a typical policer
configuration is to drop the red packets while passing the green packets,
therefore a subsequent flow action needs to be configured to determine the
final destination of green packets.

Q5: Which are the main operations exposed for the MTR object?
A5: Traffic metering, policing and statistics update. Traffic metering
determines the color for the current packet (green, yellow, red) based on
the previous history for this flow as maintained by the MTR object.
The policer can do nothing, recolor or drop the packet. Stats are
maintained for MTR object, as configured.

Q6: Where is the output color stored for the current packet.
A6: struct rte_mbuf::sched::color.

Q7: Which are the supported metering algorithms?
A7: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).

Q8: Which are the supported policer actions?
A8: Recolor the packet (keep or change the color determined by metering)
or drop the packet.

Cristian Dumitrescu (5):
  ethdev: add new flow action for metering and policing
  ethdev: add new eth_dev_ops function for mtr ops get
  ethdev: add new api for traffic metering and policing
  doc: ethdev traffic metering and policing api
  app/testpmd: cli for traffic metering and policing

 MAINTAINERS                                        |    4 +
 app/test-pmd/Makefile                              |    1 +
 app/test-pmd/cmdline.c                             |   10 +
 app/test-pmd/cmdline_flow.c                        |   24 +
 app/test-pmd/cmdline_mtr.c                         | 1013 ++++++++++++++++++++
 app/test-pmd/cmdline_mtr.h                         |   49 +
 doc/api/doxy-api-index.md                          |    1 +
 doc/guides/prog_guide/index.rst                    |    1 +
 doc/guides/prog_guide/rte_flow.rst                 |   23 +
 .../prog_guide/traffic_metering_and_policing.rst   |   97 ++
 lib/librte_ether/Makefile                          |    3 +
 lib/librte_ether/rte_ethdev.h                      |    6 +
 lib/librte_ether/rte_ethdev_version.map            |   18 +
 lib/librte_ether/rte_flow.h                        |   22 +
 lib/librte_ether/rte_mtr.c                         |  229 +++++
 lib/librte_ether/rte_mtr.h                         |  723 ++++++++++++++
 lib/librte_ether/rte_mtr_driver.h                  |  221 +++++
 17 files changed, 2445 insertions(+)
 create mode 100644 app/test-pmd/cmdline_mtr.c
 create mode 100644 app/test-pmd/cmdline_mtr.h
 create mode 100644 doc/guides/prog_guide/traffic_metering_and_policing.rst
 create mode 100644 lib/librte_ether/rte_mtr.c
 create mode 100644 lib/librte_ether/rte_mtr.h
 create mode 100644 lib/librte_ether/rte_mtr_driver.h

-- 
2.7.4

  parent reply	other threads:[~2017-10-06 14:45 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 16:44 [RFC 0/3] rte_mtr: generic ethdev API for metering and policing Cristian Dumitrescu
2017-05-30 16:44 ` [RFC 1/3] ethdev: add traffic metering and policing ops get API Cristian Dumitrescu
2017-05-30 16:44 ` [RFC 2/3] ethdev: add new rte_mtr API for traffic metering and policing Cristian Dumitrescu
2017-08-26  0:06   ` [PATCH 0/3] rte_mtr: generic ethdev API for " Cristian Dumitrescu
2017-08-26  0:06     ` [PATCH 1/3] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-09-13  5:50       ` Jerin Jacob
2017-09-19 15:52         ` Dumitrescu, Cristian
2017-10-05 13:09       ` [PATCH V2 0/5] rte_mtr: generic ethdev api for metering and policing Cristian Dumitrescu
2017-10-05 13:09         ` [PATCH V2 1/5] ethdev: add new flow action " Cristian Dumitrescu
2017-10-06 13:57           ` Adrien Mazarguil
2017-10-06 14:50             ` Dumitrescu, Cristian
2017-10-06 14:45           ` Cristian Dumitrescu [this message]
2017-10-06 14:45             ` [PATCH V3 " Cristian Dumitrescu
2017-10-06 14:55               ` Adrien Mazarguil
2017-10-13 12:22               ` [PATCH V4 0/5] rte_mtr: generic ethdev api " Cristian Dumitrescu
2017-10-13 12:22                 ` [PATCH V4 1/5] ethdev: add new flow action " Cristian Dumitrescu
2017-10-18  2:55                   ` Jerin Jacob
2017-10-13 12:22                 ` [PATCH V4 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-17 12:40                   ` Hemant Agrawal
2017-10-13 12:22                 ` [PATCH V4 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-17 12:39                   ` Hemant Agrawal
2017-10-18  2:58                   ` Jerin Jacob
2017-10-13 12:22                 ` [PATCH V4 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-13 15:43                   ` Mcnamara, John
2017-10-13 12:22                 ` [PATCH V4 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-16  9:49                   ` Wu, Jingjing
2017-10-16 10:10                     ` Wu, Jingjing
2017-10-20 12:15                 ` [PATCH V4 0/5] rte_mtr: generic ethdev api for " Dumitrescu, Cristian
2017-10-06 14:45             ` [PATCH V3 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-12 10:58               ` Hemant Agrawal
2017-10-06 14:45             ` [PATCH V3 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-12 10:48               ` Hemant Agrawal
2017-10-12 10:54                 ` Hemant Agrawal
2017-10-13 12:29                 ` Dumitrescu, Cristian
2017-10-06 14:45             ` [PATCH V3 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-12 14:59               ` Mcnamara, John
2017-10-13 12:26                 ` Dumitrescu, Cristian
2017-10-12 15:01               ` Mcnamara, John
2017-10-06 14:45             ` [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-13  6:32               ` Wu, Jingjing
2017-10-13 12:30                 ` Dumitrescu, Cristian
2017-10-05 13:09         ` [PATCH V2 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-05 13:09         ` [PATCH V2 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-05 13:09         ` [PATCH V2 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-05 13:09         ` [PATCH V2 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-06 13:58           ` Adrien Mazarguil
2017-08-26  0:06     ` [PATCH 2/3] ethdev: add new rte_mtr API " Cristian Dumitrescu
2017-09-01  8:09       ` Hemant Agrawal
2017-09-04 14:32         ` Dumitrescu, Cristian
2017-09-06  9:15           ` Hemant Agrawal
2017-09-19 16:14             ` Dumitrescu, Cristian
2017-09-21 13:20       ` Thomas Monjalon
2017-10-06 10:03         ` Dumitrescu, Cristian
2017-08-26  0:06     ` [PATCH 3/3] rte_flow: add new action " Cristian Dumitrescu
2017-09-06 16:23       ` Adrien Mazarguil
2017-09-19 16:36         ` Dumitrescu, Cristian
2017-09-19 17:00           ` Adrien Mazarguil
2017-10-06 10:02             ` Dumitrescu, Cristian
2017-09-21 13:28     ` [PATCH 0/3] rte_mtr: generic ethdev API for " Thomas Monjalon
2017-05-30 16:44 ` [RFC 3/3] rte_flow: add new action for traffic " Cristian Dumitrescu
2017-06-01 15:13   ` Adrien Mazarguil
2017-06-06 18:37     ` Dumitrescu, Cristian
2017-07-10 15:21       ` Adrien Mazarguil
2017-07-12 18:06         ` Dumitrescu, Cristian

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=1507301136-131382-1-git-send-email-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jingjing.wu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.