DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Baum <michaelba@nvidia.com>
To: <dev@dpdk.org>
Cc: Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	"Thomas Monjalon" <thomas@monjalon.net>
Subject: [PATCH] app/testpmd: add support for MPLS TTL
Date: Tue, 22 Aug 2023 17:17:54 +0300	[thread overview]
Message-ID: <20230822141754.3310105-1-michaelba@nvidia.com> (raw)

Add support for matching "ttl" field in MPLS item.

Signed-off-by: Michael Baum <michaelba@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 94827bcc4a..95c0a19beb 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -365,6 +365,7 @@ enum index {
 	ITEM_MPLS_LABEL,
 	ITEM_MPLS_TC,
 	ITEM_MPLS_S,
+	ITEM_MPLS_TTL,
 	ITEM_GRE,
 	ITEM_GRE_PROTO,
 	ITEM_GRE_C_RSVD0_VER,
@@ -1712,6 +1713,7 @@ static const enum index item_mpls[] = {
 	ITEM_MPLS_LABEL,
 	ITEM_MPLS_TC,
 	ITEM_MPLS_S,
+	ITEM_MPLS_TTL,
 	ITEM_NEXT,
 	ZERO,
 };
@@ -4650,6 +4652,13 @@ static const struct token token_list[] = {
 						  label_tc_s,
 						  "\x00\x00\x01")),
 	},
+	[ITEM_MPLS_TTL] = {
+		.name = "ttl",
+		.help = "MPLS Time-to-Live",
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED),
+			     item_param),
+		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_mpls, ttl)),
+	},
 	[ITEM_GRE] = {
 		.name = "gre",
 		.help = "match GRE header",
-- 
2.25.1


             reply	other threads:[~2023-08-22 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 14:17 Michael Baum [this message]
2023-09-01 12:21 ` Singh, Aman Deep
2023-09-21 16:24   ` 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=20230822141754.3310105-1-michaelba@nvidia.com \
    --to=michaelba@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=thomas@monjalon.net \
    --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).