diff mbox series

[v5,2/7] ethdev: allow meter color marker modification

Message ID 20220926145745.3962600-3-akozyrev@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Andrew Rybchenko
Headers show
Series ethdev: separate metering and marking from policing | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Alexander Kozyrev Sept. 26, 2022, 2:57 p.m. UTC
Extend modify_field Flow API with support of Meter Color Marker
modifications. It allows setting the packet's metadata to any
color marker: green, yellow or red. A user is able to specify
an initial packet color for Meter API or create simple Metering
and Marking flow rules based on his own coloring algorithm.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
 doc/guides/rel_notes/release_22_11.rst | 1 +
 lib/ethdev/rte_flow.h                  | 1 +
 2 files changed, 2 insertions(+)
diff mbox series


diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index eeed420ae3..0fcf2093ed 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -58,6 +58,7 @@  New Features
 * **Extended Metering and Marking support in the Flow API.**
   * Added METER_COLOR item to match Color Marker set by a Meter.
+  * Added ability to set Color Marker via modify_field Flow API.
 * **Updated Wangxun ngbe driver.**
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index c0409a5ada..d8e6608bcf 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3713,6 +3713,7 @@  enum rte_flow_field_id {
 	RTE_FLOW_FIELD_VALUE,		/**< Immediate value. */
+	RTE_FLOW_FIELD_METER_COLOR,	/**< Meter color marker. */