DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2] ethdev: add support for flow action pop E-tag
@ 2025-04-22  5:47 kirankumark
  0 siblings, 0 replies; 3+ messages in thread
From: kirankumark @ 2025-04-22  5:47 UTC (permalink / raw)
  To: Ori Kam, Aman Singh, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko
  Cc: dev, Kiran Kumar K

From: Kiran Kumar K <kirankumark@marvell.com>

Add support for the following OpenFlow-defined action.

RTE_FLOW_ACTION_TYPE_OF_POP_ETAG: Pop E-tag from the packet.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
*V2 Changes:
- Address comment related to order of enum values

 app/test-pmd/cmdline_flow.c |  9 +++++++++
 lib/ethdev/rte_flow.c       |  1 +
 lib/ethdev/rte_flow.h       | 10 +++++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 998527590f..b486bfd348 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -651,6 +651,7 @@ enum index {
 	ACTION_METER_COLOR_MODE,
 	ACTION_METER_STATE,
 	ACTION_OF_DEC_NW_TTL,
+	ACTION_OF_POP_ETAG,
 	ACTION_OF_POP_VLAN,
 	ACTION_OF_PUSH_VLAN,
 	ACTION_OF_PUSH_VLAN_ETHERTYPE,
@@ -2274,6 +2275,7 @@ static const enum index next_action[] = {
 	ACTION_METER_MARK,
 	ACTION_METER_MARK_CONF,
 	ACTION_OF_DEC_NW_TTL,
+	ACTION_OF_POP_ETAG,
 	ACTION_OF_POP_VLAN,
 	ACTION_OF_PUSH_VLAN,
 	ACTION_OF_SET_VLAN_VID,
@@ -6925,6 +6927,13 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc,
 	},
+	[ACTION_OF_POP_ETAG] = {
+		.name = "of_pop_etag",
+		.help = "OpenFlow's OFPAT_POP_ETAG",
+		.priv = PRIV_ACTION(OF_POP_ETAG, 0),
+		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+		.call = parse_vc,
+	},
 	[ACTION_OF_POP_VLAN] = {
 		.name = "of_pop_vlan",
 		.help = "OpenFlow's OFPAT_POP_VLAN",
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 9f8d8f3dc2..3d227f3bc5 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -212,6 +212,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	MK_FLOW_ACTION(METER, sizeof(struct rte_flow_action_meter)),
 	MK_FLOW_ACTION(SECURITY, sizeof(struct rte_flow_action_security)),
 	MK_FLOW_ACTION(OF_DEC_NW_TTL, 0),
+	MK_FLOW_ACTION(OF_POP_ETAG, 0),
 	MK_FLOW_ACTION(OF_POP_VLAN, 0),
 	MK_FLOW_ACTION(OF_PUSH_VLAN,
 		       sizeof(struct rte_flow_action_of_push_vlan)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 3d2ccdeb92..fb4f4bf9b7 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3201,7 +3201,7 @@ enum rte_flow_action_type {
 	 * @see struct rte_flow_query_quota
 	 * @see struct rte_flow_update_quota
 	 */
-	 RTE_FLOW_ACTION_TYPE_QUOTA,
+	RTE_FLOW_ACTION_TYPE_QUOTA,

 	/**
 	 * Skip congestion management configuration.
@@ -3263,6 +3263,14 @@ enum rte_flow_action_type {
 	 * @see struct rte_flow_action_jump_to_table_index.
 	 */
 	RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
+
+	/**
+	 * Implements POP_ETAG ("pop the outer 802.1BR Etag") as defined
+	 * by the OpenFlow Switch Specification.
+	 *
+	 * No associated configuration structure.
+	 */
+	RTE_FLOW_ACTION_TYPE_OF_POP_ETAG,
 };

 /**
--
2.48.1


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH] ethdev: add support for flow action pop E-tag
@ 2025-04-21 11:51 kirankumark
  2025-04-22  5:53 ` [PATCH v2] " kirankumark
  0 siblings, 1 reply; 3+ messages in thread
From: kirankumark @ 2025-04-21 11:51 UTC (permalink / raw)
  To: Ori Kam, Aman Singh, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko
  Cc: dev, Kiran Kumar K

From: Kiran Kumar K <kirankumark@marvell.com>

Add support for the following OpenFlow-defined action.

RTE_FLOW_ACTION_TYPE_OF_POP_ETAG: Pop E-tag from the packet.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
 app/test-pmd/cmdline_flow.c |  9 +++++++++
 lib/ethdev/rte_flow.c       |  1 +
 lib/ethdev/rte_flow.h       | 10 +++++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 998527590f..c4359e965d 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -652,6 +652,7 @@ enum index {
 	ACTION_METER_STATE,
 	ACTION_OF_DEC_NW_TTL,
 	ACTION_OF_POP_VLAN,
+	ACTION_OF_POP_ETAG,
 	ACTION_OF_PUSH_VLAN,
 	ACTION_OF_PUSH_VLAN_ETHERTYPE,
 	ACTION_OF_SET_VLAN_VID,
@@ -2275,6 +2276,7 @@ static const enum index next_action[] = {
 	ACTION_METER_MARK_CONF,
 	ACTION_OF_DEC_NW_TTL,
 	ACTION_OF_POP_VLAN,
+	ACTION_OF_POP_ETAG,
 	ACTION_OF_PUSH_VLAN,
 	ACTION_OF_SET_VLAN_VID,
 	ACTION_OF_SET_VLAN_PCP,
@@ -6932,6 +6934,13 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc,
 	},
+	[ACTION_OF_POP_ETAG] = {
+		.name = "of_pop_etag",
+		.help = "OpenFlow's OFPAT_POP_ETAG",
+		.priv = PRIV_ACTION(OF_POP_ETAG, 0),
+		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+		.call = parse_vc,
+	},
 	[ACTION_OF_PUSH_VLAN] = {
 		.name = "of_push_vlan",
 		.help = "OpenFlow's OFPAT_PUSH_VLAN",
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 9f8d8f3dc2..765a8b3dbb 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -213,6 +213,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	MK_FLOW_ACTION(SECURITY, sizeof(struct rte_flow_action_security)),
 	MK_FLOW_ACTION(OF_DEC_NW_TTL, 0),
 	MK_FLOW_ACTION(OF_POP_VLAN, 0),
+	MK_FLOW_ACTION(OF_POP_ETAG, 0),
 	MK_FLOW_ACTION(OF_PUSH_VLAN,
 		       sizeof(struct rte_flow_action_of_push_vlan)),
 	MK_FLOW_ACTION(OF_SET_VLAN_VID,
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 3d2ccdeb92..fb4f4bf9b7 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3201,7 +3201,7 @@ enum rte_flow_action_type {
 	 * @see struct rte_flow_query_quota
 	 * @see struct rte_flow_update_quota
 	 */
-	 RTE_FLOW_ACTION_TYPE_QUOTA,
+	RTE_FLOW_ACTION_TYPE_QUOTA,
 
 	/**
 	 * Skip congestion management configuration.
@@ -3263,6 +3263,14 @@ enum rte_flow_action_type {
 	 * @see struct rte_flow_action_jump_to_table_index.
 	 */
 	RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX,
+
+	/**
+	 * Implements POP_ETAG ("pop the outer 802.1BR Etag") as defined
+	 * by the OpenFlow Switch Specification.
+	 *
+	 * No associated configuration structure.
+	 */
+	RTE_FLOW_ACTION_TYPE_OF_POP_ETAG,
 };
 
 /**
-- 
2.48.1


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

end of thread, other threads:[~2025-04-23  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22  5:47 [PATCH v2] ethdev: add support for flow action pop E-tag kirankumark
  -- strict thread matches above, loose matches on Subject: below --
2025-04-21 11:51 [PATCH] " kirankumark
2025-04-22  5:53 ` [PATCH v2] " kirankumark
2025-04-23  0:03   ` Thomas Monjalon

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