[2/3] app/testpmd: add new action kernel
Checks
Commit Message
Add new test-pmd rte_flow action 'send_to_kernel'. The application
may use this action to route the packet to the kernel while still
in the HW.
The example of test-pmd command:
flow create 0 ingress priority 0 group 1 pattern eth type spec 0x0800
type mask 0xffff / end actions send_to_kernel / end
Signed-off-by: Michael Savisko <michaelsav@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -612,6 +612,7 @@ enum index {
ACTION_PORT_REPRESENTOR_PORT_ID,
ACTION_REPRESENTED_PORT,
ACTION_REPRESENTED_PORT_ETHDEV_PORT_ID,
+ ACTION_SEND_TO_KERNEL,
};
/** Maximum size for pattern in struct rte_flow_item_raw. */
@@ -1872,6 +1873,7 @@ static const enum index next_action[] = {
ACTION_CONNTRACK_UPDATE,
ACTION_PORT_REPRESENTOR,
ACTION_REPRESENTED_PORT,
+ ACTION_SEND_TO_KERNEL,
ZERO,
};
@@ -6341,6 +6343,13 @@ static const struct token token_list[] = {
.help = "submit a list of associated actions for red",
.next = NEXT(next_action),
},
+ [ACTION_SEND_TO_KERNEL] = {
+ .name = "send_to_kernel",
+ .help = "send packets to kernel",
+ .priv = PRIV_ACTION(SEND_TO_KERNEL, 0),
+ .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+ .call = parse_vc,
+ },
/* Top-level command. */
[ADD] = {