From: Dekel Peled <dekelp@nvidia.com>
To: orika@nvidia.com, wenzhuo.lu@intel.com, beilei.xing@intel.com,
bernard.iremonger@intel.com, mdr@ashroe.eu,
nhorman@tuxdriver.com, thomas@monjalon.net,
ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v5 2/2] app/testpmd: support VLAN attributes in ETH and VLAN items
Date: Thu, 15 Oct 2020 18:51:47 +0300 [thread overview]
Message-ID: <367de7977cca9270b6fc278d4bc6d94715a29252.1602776948.git.dekelp@nvidia.com> (raw)
In-Reply-To: <cover.1602776947.git.dekelp@nvidia.com>
rte_flow update introduced has_vlan field for ETH header item,
and field has_more_vlan for VLAN header item.
The new fields are used to clearly indicate packet tagging chrasteristics.
This patch updates testpmd CLI to support the new fields.
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 84bba0f..00c70a1 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -141,12 +141,14 @@ enum index {
ITEM_ETH_DST,
ITEM_ETH_SRC,
ITEM_ETH_TYPE,
+ ITEM_ETH_HAS_VLAN,
ITEM_VLAN,
ITEM_VLAN_TCI,
ITEM_VLAN_PCP,
ITEM_VLAN_DEI,
ITEM_VLAN_VID,
ITEM_VLAN_INNER_TYPE,
+ ITEM_VLAN_HAS_MORE_VLAN,
ITEM_IPV4,
ITEM_IPV4_TOS,
ITEM_IPV4_FRAGMENT_OFFSET,
@@ -936,6 +938,7 @@ struct parse_action_priv {
ITEM_ETH_DST,
ITEM_ETH_SRC,
ITEM_ETH_TYPE,
+ ITEM_ETH_HAS_VLAN,
ITEM_NEXT,
ZERO,
};
@@ -946,6 +949,7 @@ struct parse_action_priv {
ITEM_VLAN_DEI,
ITEM_VLAN_VID,
ITEM_VLAN_INNER_TYPE,
+ ITEM_VLAN_HAS_MORE_VLAN,
ITEM_NEXT,
ZERO,
};
@@ -2217,6 +2221,13 @@ static int comp_set_sample_index(struct context *, const struct token *,
.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
},
+ [ITEM_ETH_HAS_VLAN] = {
+ .name = "has_vlan",
+ .help = "packet header contains VLAN",
+ .next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
+ has_vlan, 1)),
+ },
[ITEM_VLAN] = {
.name = "vlan",
.help = "match 802.1Q/ad VLAN tag",
@@ -2258,6 +2269,13 @@ static int comp_set_sample_index(struct context *, const struct token *,
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
inner_type)),
},
+ [ITEM_VLAN_HAS_MORE_VLAN] = {
+ .name = "has_more_vlan",
+ .help = "packet header contains another VLAN",
+ .next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
+ has_more_vlan, 1)),
+ },
[ITEM_IPV4] = {
.name = "ipv4",
.help = "match IPv4 header",
--
1.8.3.1
next prev parent reply other threads:[~2020-10-15 15:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 18:49 [dpdk-dev] [PATCH] ethdev: add VLAN attributes to " Dekel Peled
2020-10-01 19:01 ` [dpdk-dev] [PATCH v2] " Dekel Peled
2020-10-07 18:21 ` [dpdk-dev] [PATCH v3] " Dekel Peled
2020-10-02 12:39 ` [dpdk-dev] [PATCH] " Maxime Leroy
2020-10-02 14:40 ` Thomas Monjalon
2020-10-05 9:37 ` Dekel Peled
2020-10-07 11:52 ` Maxime Leroy
2020-10-07 12:13 ` Ori Kam
2020-10-07 14:01 ` Dekel Peled
2020-10-14 18:53 ` [dpdk-dev] [PATCH v4 0/2] support VLAN attributes in " Dekel Peled
2020-10-14 18:53 ` [dpdk-dev] [PATCH v4 1/2] ethdev: add VLAN attributes to " Dekel Peled
2020-10-14 20:13 ` Thomas Monjalon
2020-10-15 10:34 ` Andrew Rybchenko
2020-10-15 15:06 ` Dekel Peled
2020-10-14 18:53 ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: support VLAN attributes in " Dekel Peled
2020-10-15 6:09 ` Ori Kam
2020-10-15 15:51 ` [dpdk-dev] [PATCH v5 0/2] " Dekel Peled
2020-10-15 15:51 ` [dpdk-dev] [PATCH v5 1/2] ethdev: add VLAN attributes to " Dekel Peled
2020-10-15 16:11 ` Ori Kam
2020-10-15 15:51 ` Dekel Peled [this message]
2020-10-15 23:18 ` [dpdk-dev] [PATCH v5 0/2] support VLAN attributes in " Ferruh Yigit
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=367de7977cca9270b6fc278d4bc6d94715a29252.1602776948.git.dekelp@nvidia.com \
--to=dekelp@nvidia.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=mdr@ashroe.eu \
--cc=nhorman@tuxdriver.com \
--cc=orika@nvidia.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@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).