DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: add support for MPLS TTL
@ 2023-08-22 14:17 Michael Baum
  2023-09-01 12:21 ` Singh, Aman Deep
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Baum @ 2023-08-22 14:17 UTC (permalink / raw)
  To: dev; +Cc: Aman Singh, Yuying Zhang, Ferruh Yigit, Thomas Monjalon

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-21 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 14:17 [PATCH] app/testpmd: add support for MPLS TTL Michael Baum
2023-09-01 12:21 ` Singh, Aman Deep
2023-09-21 16:24   ` Ferruh Yigit

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).