ethdev: add API for traffic metering and policing
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Fri, 13 Oct 2017 12:22:16 +0000 (13:22 +0100)
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>
Fri, 20 Oct 2017 12:09:28 +0000 (14:09 +0200)
commit6613ffe1382b416836017fdae7e30a7087e3d240
tree495294947814352f8298c15870261f0b63932613
parent10f32b0f4ebc06000d1cbc14c1b95f8acc5c62ec
ethdev: add API for traffic metering and policing

This patch introduces new ethdev 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.

Main features:
1. Traffic metering: determine the color for the current packet (green,
   yellow, red) based on history maintained by the MTR object. Supported
   algorithms: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).
2. Policing (per meter output color actions): re-color the packet (keep
   or change the meter output color) or drop the packet.
3. Statistics
4. Capability API

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
MAINTAINERS
doc/api/doxy-api-index.md
lib/librte_ether/Makefile
lib/librte_ether/rte_ethdev_version.map
lib/librte_ether/rte_mtr.c [new file with mode: 0644]
lib/librte_ether/rte_mtr.h [new file with mode: 0644]
lib/librte_ether/rte_mtr_driver.h [new file with mode: 0644]