[v2,5/7] ethdev: add jump to table index action
Checks
Commit Message
Introduce the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action.
It redirects packets to a particular index in a flow table.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
doc/guides/rel_notes/release_24_11.rst | 4 ++++
lib/ethdev/rte_flow.c | 1 +
lib/ethdev/rte_flow.h | 23 +++++++++++++++++++++++
3 files changed, 28 insertions(+)
Comments
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Wednesday, September 25, 2024 9:06 PM
>
> Introduce the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action.
> It redirects packets to a particular index in a flow table.
>
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> ---
Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
@@ -65,6 +65,10 @@ New Features
Added API for inserting the rule by index with pattern.
Introduced rte_flow_async_create_by_index_with_pattern() function.
+* **Added the action to redirect packets to a particular index in a flow table.**
+
+ Introduced RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action type.
+
Removed Items
-------------
@@ -275,6 +275,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
MK_FLOW_ACTION(PROG,
sizeof(struct rte_flow_action_prog)),
MK_FLOW_ACTION(NAT64, sizeof(struct rte_flow_action_nat64)),
+ MK_FLOW_ACTION(JUMP_TO_TABLE_INDEX, sizeof(struct rte_flow_action_jump_to_table_index)),
};
int
@@ -3262,6 +3262,15 @@ enum rte_flow_action_type {
* @see struct rte_flow_action_nat64
*/
RTE_FLOW_ACTION_TYPE_NAT64,
+
+ /**
+ * RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
+ *
+ * Redirects packets to a particular index in a flow table.
+ *
+ * @see struct rte_flow_action_jump_to_table_index.
+ */
+ RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
};
/**
@@ -4266,6 +4275,20 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
*RTE_FLOW_DYNF_METADATA(m) = v;
}
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX
+ *
+ * Redirects packets to a particular index in a flow table.
+ *
+ */
+struct rte_flow_action_jump_to_table_index {
+ struct rte_flow_template_table *table;
+ uint32_t index;
+};
+
/**
* Definition of a single action.
*