[dpdk-dev] [PATCH v3 3/4] ethdev: Add group action type to rte_flow

Declan Doherty declan.doherty at intel.com
Fri Apr 6 14:24:02 CEST 2018


Add group action type which defines a terminating action which
allows a matched flow to be redirect to a group. This allows logical
flow table hierarchies to be managed through rte_flow.

Signed-off-by: Declan Doherty <declan.doherty at intel.com>
---
 doc/guides/prog_guide/rte_flow.rst | 23 +++++++++++++++++++++++
 lib/librte_ether/rte_flow.h        | 15 +++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 106fb93..2f0a47a 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1557,6 +1557,29 @@ set of overlay header type.
    | ``item type`` | Item type of tunnel end-point to decapsulate |
    +---------------+----------------------------------------------+
 
+
+Action: ``GROUP``
+^^^^^^^^^^^^^^^^^
+
+Redirects packets to a group on the current device.
+
+In a hierarchy of groups, which can be used to represent physical or logical
+flow tables on the device, this action allows the terminating action to be a
+group on that device.
+
+- Terminating by default.
+
+.. _table_rte_flow_action_group:
+
+.. table:: GROUP
+
+   +--------------+---------------------------------+
+   | Field        | Value                           |
+   +==============+=================================+
+   | ``id``       | Group ID to redirect packets to |
+   +--------------+---------------------------------+
+
+
 Negative types
 ~~~~~~~~~~~~~~
 
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 6d94423..968a23b 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -1251,6 +1251,21 @@ struct rte_flow_action_tunnel_decap {
 };
 
 /**
+ * RTE_FLOW_ACTION_TYPE_GROUP
+ *
+ * Redirects packets to a group on the current device.
+ *
+ * In a hierarchy of groups, which can be used to represent physical or logical
+ * flow tables on the device, this action allows the terminating action to be a
+ * group on that device.
+ *
+ * Terminating by default.
+ */
+struct rte_flow_action_group {
+	uint32_t id;
+};
+
+/**
  * Definition of a single action.
  *
  * A list of actions is terminated by a END action.
-- 
2.7.4



More information about the dev mailing list