From: Michael Savisko <michaelsav@nvidia.com>
To: <dev@dpdk.org>
Cc: <michaelsav@nvidia.com>, <asafp@nvidia.com>, <orika@nvidia.com>,
"Aman Singh" <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Subject: [PATCH 2/3] app/testpmd: add new action kernel
Date: Mon, 12 Sep 2022 15:59:07 +0300 [thread overview]
Message-ID: <20220912125908.922188-2-michaelsav@nvidia.com> (raw)
In-Reply-To: <20220912125908.922188-1-michaelsav@nvidia.com>
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(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 7f50028eb7..042f6b34a6 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -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] = {
--
2.27.0
next prev parent reply other threads:[~2022-09-12 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 12:59 [PATCH 1/3] ethdev: add send to kernel action Michael Savisko
2022-09-12 12:59 ` Michael Savisko [this message]
2022-09-12 12:59 ` [PATCH 3/3] doc: update testpmd application guide Michael Savisko
2022-09-12 13:14 ` [PATCH 1/3] ethdev: add send to kernel action Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220912125908.922188-2-michaelsav@nvidia.com \
--to=michaelsav@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=asafp@nvidia.com \
--cc=dev@dpdk.org \
--cc=orika@nvidia.com \
--cc=yuying.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).