Skip to contentSkip to conversation

ethdev: add indirect list METER_MARK update structures

PATCH Superseded Gregory Etelson 3 participants 5 messages May 28, 2023 – May 31, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: add indirect list METER_MARK update structures

In the indirect list API, update action and update flow contexts are mutually exclusive.
The patch splits legacy METER_MASK update structure to support indirect list API:

struct rte_flow_indirect_update_action_meter_mark defines METER_MARK action context that is shared between all flows that reference a given indirect list handle.

struct rte_flow_indirect_update_flow_meter_mark defines METER_MARK context private to specific flow.

Depends-on: patch-127638 ("ethdev: add indirect list flow action")

---
 lib/ethdev/rte_flow.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
lib/ethdev/rte_flow.h +11 -0
index 71727883ad..750df8401d 100644
@@ -3891,6 +3891,17 @@ struct rte_flow_update_meter_mark {
 	uint32_t reserved:27;
 };
 
+/**
+ * @see RTE_FLOW_ACTION_TYPE_METER_MARK
+ * @see RTE_FLOW_ACTION_TYPE_INDIRECT_LIST
+ *
+ * Update flow mutable context.
+ */
+struct rte_flow_indirect_update_flow_meter_mark {
+	/** Updated init color applied to packet */
+	enum rte_color init_color;
+};
+
 /* Mbuf dynamic field offset for metadata. */
 extern int32_t rte_flow_dynf_metadata_offs;
 
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/1 ethdev: add indirect list METER_MARK flow update structure

Indirect list API defines 2 types of action update:
• Action mutable context is always shared between all flows that referenced indirect actions list handle. Action mutable context can be changed by explicit invocation of indirect handle update function.
• Flow mutable context is private to a flow.
Flow mutable context can be updated by indirect list handle flow rule configuration.

The patch defines struct rte_flow_indirect_update_flow_meter_mark for indirect METER_MARK flow mutable updates.

Depends-on: patch-127638 ("ethdev: add indirect list flow action")

---
 lib/ethdev/rte_flow.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
lib/ethdev/rte_flow.h +11 -0
index 71727883ad..750df8401d 100644
@@ -3891,6 +3891,17 @@ struct rte_flow_update_meter_mark {
 	uint32_t reserved:27;
 };
 
+/**
+ * @see RTE_FLOW_ACTION_TYPE_METER_MARK
+ * @see RTE_FLOW_ACTION_TYPE_INDIRECT_LIST
+ *
+ * Update flow mutable context.
+ */
+struct rte_flow_indirect_update_flow_meter_mark {
+	/** Updated init color applied to packet */
+	enum rte_color init_color;
+};
+
 /* Mbuf dynamic field offset for metadata. */
 extern int32_t rte_flow_dynf_metadata_offs;
 
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 1/1 ethdev: add indirect list METER_MARK flow update structure

In reply to Gregory Etelson

Indirect list API defines 2 types of action update:
• Action mutable context is always shared between all flows that referenced indirect actions list handle. Action mutable context can be changed by explicit invocation of indirect handle update function.
• Flow mutable context is private to a flow.
Flow mutable context can be updated by indirect list handle flow rule configuration.

The patch defines struct rte_flow_indirect_update_flow_meter_mark for indirect METER_MARK flow mutable updates.

---
Depends-on: patch-127638 ("ethdev: add indirect list flow action")

---
 lib/ethdev/rte_flow.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
lib/ethdev/rte_flow.h +11 -0
index 71727883ad..750df8401d 100644
@@ -3891,6 +3891,17 @@ struct rte_flow_update_meter_mark {
 	uint32_t reserved:27;
 };
 
+/**
+ * @see RTE_FLOW_ACTION_TYPE_METER_MARK
+ * @see RTE_FLOW_ACTION_TYPE_INDIRECT_LIST
+ *
+ * Update flow mutable context.
+ */
+struct rte_flow_indirect_update_flow_meter_mark {
+	/** Updated init color applied to packet */
+	enum rte_color init_color;
+};
+
 /* Mbuf dynamic field offset for metadata. */
 extern int32_t rte_flow_dynf_metadata_offs;
 
Signature · 1 line
2.34.1
Acked-by on v3 1/1
#3 lore raw

RE: [PATCH v3] ethdev: add indirect list METER_MARK flow update structure

Hi Gregory

Quoted 47 lines

-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Sunday, May 28, 2023 7:21 PM
To: [email protected]

Indirect list API defines 2 types of action update:
• Action mutable context is always shared between all flows that referenced indirect actions list handle. Action mutable context can be changed by explicit invocation of indirect handle update function.
• Flow mutable context is private to a flow.
Flow mutable context can be updated by indirect list handle flow rule configuration.

The patch defines struct rte_flow_indirect_update_flow_meter_mark for indirect METER_MARK flow mutable updates.

---
Depends-on: patch-127638 ("ethdev: add indirect list flow action")

---
 lib/ethdev/rte_flow.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
lib/ethdev/rte_flow.h +11 -1
index 71727883ad..750df8401d 100644
@@ -3891,6 +3891,17 @@ struct rte_flow_update_meter_mark {
 	uint32_t reserved:27;
 };
 
+/**
+ * @see RTE_FLOW_ACTION_TYPE_METER_MARK
+ * @see RTE_FLOW_ACTION_TYPE_INDIRECT_LIST
+ *
+ * Update flow mutable context.
+ */
+struct rte_flow_indirect_update_flow_meter_mark {
+	/** Updated init color applied to packet */
+	enum rte_color init_color;
+};
+
 /* Mbuf dynamic field offset for metadata. */
 extern int32_t rte_flow_dynf_metadata_offs;
 
--
Quoted 1 line

2.34.1

Best,
Ori

Applied
#4 lore raw

Re: [PATCH v3] ethdev: add indirect list METER_MARK flow update structure

Quoted 48 lines · Ori Kam

Hi Gregory

Quoted 46 lines

-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Sunday, May 28, 2023 7:21 PM
To: [email protected]

Indirect list API defines 2 types of action update:
• Action mutable context is always shared between all flows that referenced indirect actions list handle. Action mutable context can be changed by explicit invocation of indirect handle update function.
• Flow mutable context is private to a flow.
Flow mutable context can be updated by indirect list handle flow rule configuration.

The patch defines struct rte_flow_indirect_update_flow_meter_mark for indirect METER_MARK flow mutable updates.

---
Depends-on: patch-127638 ("ethdev: add indirect list flow action")

---
 lib/ethdev/rte_flow.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
lib/ethdev/rte_flow.h +11 -0
index 71727883ad..750df8401d 100644
@@ -3891,6 +3891,17 @@ struct rte_flow_update_meter_mark {
 	uint32_t reserved:27;
 };
 
+/**
+ * @see RTE_FLOW_ACTION_TYPE_METER_MARK
+ * @see RTE_FLOW_ACTION_TYPE_INDIRECT_LIST
+ *
+ * Update flow mutable context.
+ */
+struct rte_flow_indirect_update_flow_meter_mark {
+	/** Updated init color applied to packet */
+	enum rte_color init_color;
+};
+
 /* Mbuf dynamic field offset for metadata. */
 extern int32_t rte_flow_dynf_metadata_offs;
 
Quoted 5 lines
Quoted 2 lines

--
2.34.1

Applied to dpdk-next-net/main, thanks.