From: Haifei Luo <haifeil@nvidia.com>
To: <dev@dpdk.org>
Cc: <orika@nvidia.com>, <viacheslavo@nvidia.com>,
<rasland@nvidia.com>, <xuemingl@nvidia.com>, <haifeil@nvidia.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Suanming Mou <suanmingm@nvidia.com>,
Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
"Matan Azrad" <matan@nvidia.com>
Subject: [PATCH v4 4/5] app/testpmd: support for NSH flow item
Date: Sun, 8 Oct 2023 06:10:28 +0300 [thread overview]
Message-ID: <20231008031029.30850-5-haifeil@nvidia.com> (raw)
In-Reply-To: <20231008031029.30850-1-haifeil@nvidia.com>
Add support for item NSH. The CLI is: nsh
Example:
flow create 0 transfer group 1
pattern eth / ipv6 / udp dst is 4790 /
vxlan-gpe / nsh / eth / ipv4 / tcp / end
actions port_id id 1 / end
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 16 ++++++++++++++++
doc/guides/nics/features/mlx5.ini | 1 +
2 files changed, 17 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 8a4e06c50a..84de3a2506 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -526,6 +526,7 @@ enum index {
ITEM_IB_BTH_PSN,
ITEM_IPV6_PUSH_REMOVE_EXT,
ITEM_IPV6_PUSH_REMOVE_EXT_TYPE,
+ ITEM_NSH,
/* Validate/create actions. */
ACTIONS,
@@ -1563,6 +1564,7 @@ static const enum index next_item[] = {
ITEM_AGGR_AFFINITY,
ITEM_TX_QUEUE,
ITEM_IB_BTH,
+ ITEM_NSH,
END_SET,
ZERO,
};
@@ -2083,6 +2085,11 @@ static const enum index item_ib_bth[] = {
ZERO,
};
+static const enum index item_nsh[] = {
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index next_action[] = {
ACTION_END,
ACTION_VOID,
@@ -5846,6 +5853,15 @@ static const struct token token_list[] = {
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth,
hdr.psn)),
},
+ [ITEM_NSH] = {
+ .name = "nsh",
+ .help = "match NSH header",
+ .priv = PRIV_ITEM(NSH,
+ sizeof(struct rte_flow_item_nsh)),
+ .next = NEXT(item_nsh),
+ .call = parse_vc,
+ },
+
/* Validate/create actions. */
[ACTIONS] = {
.name = "actions",
diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
index c0e0b779cf..fc67415c6c 100644
--- a/doc/guides/nics/features/mlx5.ini
+++ b/doc/guides/nics/features/mlx5.ini
@@ -82,6 +82,7 @@ mark = Y
meta = Y
meter_color = Y
mpls = Y
+nsh = Y
nvgre = Y
port_id = Y
port_representor = Y
--
2.27.0
next prev parent reply other threads:[~2023-10-08 3:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 7:40 [PATCH 0/5] support item NSH matching Haifei Luo
2023-08-09 7:40 ` [PATCH 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-08-09 7:40 ` [PATCH 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-08-09 7:40 ` [PATCH 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-08-09 7:40 ` [PATCH 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-08-09 7:40 ` [PATCH 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-09-25 2:09 ` [PATCH v2 0/5] support item NSH matching Haifei Luo
2023-09-25 2:09 ` [PATCH v2 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-09-25 2:09 ` [PATCH v2 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-09-25 2:09 ` [PATCH v2 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-09-25 2:09 ` [PATCH v2 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-09-25 2:09 ` [PATCH v2 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-09-25 8:07 ` [PATCH v3 0/5] support item NSH matching Haifei Luo
2023-09-25 8:07 ` [PATCH v3 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-09-25 8:07 ` [PATCH v3 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-09-25 8:07 ` [PATCH v3 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-09-25 8:07 ` [PATCH v3 4/5] app/testpmd: support for NSH flow item Haifei Luo
2023-09-25 8:07 ` [PATCH v3 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-10-08 3:10 ` [PATCH v4 0/5] support item NSH matching Haifei Luo
2023-10-08 3:10 ` [PATCH v4 1/5] app/testpmd: support for VXLAN-GPE's next protocol Haifei Luo
2023-10-08 3:10 ` [PATCH v4 2/5] common/mlx5: extend HCA attribute query for NSH Haifei Luo
2023-10-08 3:10 ` [PATCH v4 3/5] net/mlx5: enhance the validation for item VXLAN-GPE Haifei Luo
2023-10-08 3:10 ` Haifei Luo [this message]
2023-10-08 3:10 ` [PATCH v4 5/5] net/mlx5: add support for item NSH Haifei Luo
2023-10-09 11:15 ` [PATCH v4 0/5] support item NSH matching Raslan Darawsheh
2023-10-16 9:27 ` Thomas Monjalon
2023-10-08 10:34 ` [PATCH v2 " Raslan Darawsheh
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=20231008031029.30850-5-haifeil@nvidia.com \
--to=haifeil@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
--cc=xuemingl@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).