Skip to content

Commit fddb398

Browse files
aleks-kozyrevferruhy
authored andcommitted
ethdev: add jump to table index action
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 <[email protected]> Acked-by: Ori Kam <[email protected]>
1 parent ada7f97 commit fddb398

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

doc/guides/rel_notes/release_24_11.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ New Features
6565
Added API for inserting the rule by index with pattern.
6666
Introduced rte_flow_async_create_by_index_with_pattern() function.
6767

68+
* **Added the action to redirect packets to a particular index in a flow table.**
69+
70+
Introduced RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action type.
71+
6872
* **Updated Cisco enic driver.**
6973

7074
* Added SR-IOV VF support.

lib/ethdev/rte_flow.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
275275
MK_FLOW_ACTION(PROG,
276276
sizeof(struct rte_flow_action_prog)),
277277
MK_FLOW_ACTION(NAT64, sizeof(struct rte_flow_action_nat64)),
278+
MK_FLOW_ACTION(JUMP_TO_TABLE_INDEX, sizeof(struct rte_flow_action_jump_to_table_index)),
278279
};
279280

280281
int

lib/ethdev/rte_flow.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,15 @@ enum rte_flow_action_type {
32623262
* @see struct rte_flow_action_nat64
32633263
*/
32643264
RTE_FLOW_ACTION_TYPE_NAT64,
3265+
3266+
/**
3267+
* RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
3268+
*
3269+
* Redirects packets to a particular index in a flow table.
3270+
*
3271+
* @see struct rte_flow_action_jump_to_table_index.
3272+
*/
3273+
RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
32653274
};
32663275

32673276
/**
@@ -4266,6 +4275,20 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
42664275
*RTE_FLOW_DYNF_METADATA(m) = v;
42674276
}
42684277

4278+
/**
4279+
* @warning
4280+
* @b EXPERIMENTAL: this structure may change without prior notice
4281+
*
4282+
* RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX
4283+
*
4284+
* Redirects packets to a particular index in a flow table.
4285+
*
4286+
*/
4287+
struct rte_flow_action_jump_to_table_index {
4288+
struct rte_flow_template_table *table;
4289+
uint32_t index;
4290+
};
4291+
42694292
/**
42704293
* Definition of a single action.
42714294
*

0 commit comments

Comments
 (0)