patch 'app/testpmd: fix meter mark handle update' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 02:10:34 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=3eda3753f8ff24b497a0cdd1be43a510d861addb

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3eda3753f8ff24b497a0cdd1be43a510d861addb Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at nvidia.com>
Date: Tue, 18 Jul 2023 16:32:14 +0300
Subject: [PATCH] app/testpmd: fix meter mark handle update
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5ed396098e662be8638c2d08c711db2823c386ac ]

The indirect action handle update for the METER_MARK action
was implemented only for the async flow API.
Allow updating the METER_MARK parameters via the old sync method.

Fixes: 9c4a0c1859a3 ("ethdev: add meter color mark flow action")

Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 app/test-pmd/config.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index acccb6b035..6a9eb4609c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1875,6 +1875,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
 	struct rte_flow_error error;
 	struct rte_flow_action_handle *action_handle;
 	struct port_indirect_action *pia;
+	struct rte_flow_update_meter_mark mtr_update;
 	const void *update;
 
 	action_handle = port_action_handle_get_by_id(port_id, id);
@@ -1888,6 +1889,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
 		update = action->conf;
 		break;
+	case RTE_FLOW_ACTION_TYPE_METER_MARK:
+		memcpy(&mtr_update.meter_mark, action->conf,
+		       sizeof(struct rte_flow_action_meter_mark));
+		if (mtr_update.meter_mark.profile)
+			mtr_update.profile_valid = 1;
+		if (mtr_update.meter_mark.policy)
+			mtr_update.policy_valid = 1;
+		mtr_update.color_mode_valid = 1;
+		mtr_update.state_valid = 1;
+		update = &mtr_update;
+		break;
 	default:
 		update = action;
 		break;
@@ -2924,8 +2936,10 @@ port_queue_action_handle_update(portid_t port_id,
 	case RTE_FLOW_ACTION_TYPE_METER_MARK:
 		rte_memcpy(&mtr_update.meter_mark, action->conf,
 			sizeof(struct rte_flow_action_meter_mark));
-		mtr_update.profile_valid = 1;
-		mtr_update.policy_valid = 1;
+		if (mtr_update.meter_mark.profile)
+			mtr_update.profile_valid = 1;
+		if (mtr_update.meter_mark.policy)
+			mtr_update.policy_valid = 1;
 		mtr_update.color_mode_valid = 1;
 		mtr_update.init_color_valid = 1;
 		mtr_update.state_valid = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:21.134752400 +0800
+++ 0117-app-testpmd-fix-meter-mark-handle-update.patch	2023-08-09 21:51:18.294352000 +0800
@@ -1 +1 @@
-From 5ed396098e662be8638c2d08c711db2823c386ac Mon Sep 17 00:00:00 2001
+From 3eda3753f8ff24b497a0cdd1be43a510d861addb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5ed396098e662be8638c2d08c711db2823c386ac ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index c4784b7f2c..11f3a22048 100644
+index acccb6b035..6a9eb4609c 100644
@@ -23 +25 @@
-@@ -1943,6 +1943,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
+@@ -1875,6 +1875,7 @@ port_action_handle_update(portid_t port_id, uint32_t id,
@@ -31 +33 @@
-@@ -1956,6 +1957,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
+@@ -1888,6 +1889,17 @@ port_action_handle_update(portid_t port_id, uint32_t id,
@@ -49 +51 @@
-@@ -3162,8 +3174,10 @@ port_queue_action_handle_update(portid_t port_id,
+@@ -2924,8 +2936,10 @@ port_queue_action_handle_update(portid_t port_id,


More information about the stable mailing list