[v10,1/3] ethdev: skip congestion management configuration

Message ID 20230215174251.1698253-1-rkudurumalla@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v10,1/3] ethdev: skip congestion management configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure

Commit Message

Rakesh Kudurumalla Feb. 15, 2023, 5:42 p.m. UTC
  Introduce new flow action to skip congestion management configuration
This feature helps to skip the congestion management processing
based on per flow or the packet color identified by
rte_flow meter object. For example, If one Rx queue configured as
RED congestion and application wants tobypass the RED congestion
processing for all GREEN color packet can be expressed though
RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
v10: Rebased on top of dpdk-next-net

 doc/guides/nics/features/default.ini   |  1 +
 doc/guides/prog_guide/rte_flow.rst     | 22 ++++++++++++++++++++++
 doc/guides/rel_notes/release_23_03.rst |  6 ++++++
 lib/ethdev/rte_flow.h                  | 11 +++++++++++
 4 files changed, 40 insertions(+)
  

Patch

diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 976a020985..49e41b8002 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -200,6 +200,7 @@  set_tag              =
 set_tp_dst           =
 set_tp_src           =
 set_ttl              =
+skip_cman            =
 vf                   =
 vxlan_decap          =
 vxlan_encap          =
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 161c5dce53..76045386ba 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1832,6 +1832,28 @@  Drop packets.
    | no properties |
    +---------------+
 
+
+Action: ``SKIP_CMAN``
+^^^^^^^^^^^^^^^^^^^^^
+
+Skip congestion management on received packets
+
+- Using ``rte_eth_cman_config_set()``, application can configure ethdev Rx
+  queue's congestion mechanism.Once applied packets congestion configuration
+  is bypassed on that particular ethdev Rx queue for all packets directed
+  to that receive queue
+
+.. _table_rte_flow_action_skip_cman:
+
+.. table:: SKIP_CMAN
+
+   +---------------+
+   | Field         |
+   +===============+
+   | no properties |
+   +---------------+
+
+
 Action: ``COUNT``
 ^^^^^^^^^^^^^^^^^
 
diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst
index ad23355e54..286cffab95 100644
--- a/doc/guides/rel_notes/release_23_03.rst
+++ b/doc/guides/rel_notes/release_23_03.rst
@@ -97,6 +97,12 @@  New Features
     ``rte_flow_configure``.
   * Added ``host_port_id`` to ``rte_flow_port_attr`` structure.
 
+* **Added support to skip congestion management configuration.**
+
+  * Added a new action ``RTE_FLOW_ACTION_TYPE_SKIP_CMAN`` to skip
+    congestion management processing based on per flow or packet color
+    identified by rte_flow meter object
+
 * **Updated AMD axgbe driver.**
 
   * Added multi-process support.
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 6a51442b8c..069b2210f1 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2820,6 +2820,17 @@  enum rte_flow_action_type {
 	 * No associated configuration structure.
 	 */
 	RTE_FLOW_ACTION_TYPE_SEND_TO_KERNEL,
+
+	/**
+	 * Skip congestion management configuration
+	 *
+	 * Using rte_eth_cman_config_set() API the application
+	 * can configure ethdev Rx queue's congestion mechanism.
+	 * Introducing RTE_FLOW_ACTION_TYPE_SKIP_CMAN flow action to skip the
+	 * congestion configuration applied to the given ethdev Rx queue.
+	 *
+	 */
+	RTE_FLOW_ACTION_TYPE_SKIP_CMAN,
 };
 
 /**