patch 'app/testpmd: remove redundant policy action condition' has been queued to stable release 21.11.9

Kevin Traynor ktraynor at redhat.com
Wed Nov 27 18:19:08 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/24. 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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3c69c95e715abbfbb3d980d529b7844ea493434f

Thanks.

Kevin

---
>From 3c69c95e715abbfbb3d980d529b7844ea493434f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:29 -0800
Subject: [PATCH] app/testpmd: remove redundant policy action condition

[ upstream commit 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d ]

The loop over policy actions will always exit when it sees
the flow end action, so the next check is redundant.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: f29fa2c59b85 ("app/testpmd: support policy actions per color")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index aa979e886f..ad215c78f6 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2064,5 +2064,5 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
 			act->type != RTE_FLOW_ACTION_TYPE_END; act++)
 			act_n++;
-		if (act_n && act->type == RTE_FLOW_ACTION_TYPE_END)
+		if (act_n > 0)
 			policy.actions[i] = start;
 		else
-- 
2.47.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 17:17:42.052627006 +0000
+++ 0121-app-testpmd-remove-redundant-policy-action-condition.patch	2024-11-27 17:17:38.361270078 +0000
@@ -1 +1 @@
-From 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d Mon Sep 17 00:00:00 2001
+From 3c69c95e715abbfbb3d980d529b7844ea493434f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- app/test-pmd/config.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ app/test-pmd/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -22 +23 @@
-index 28d45568ac..4e7fb69183 100644
+index aa979e886f..ad215c78f6 100644
@@ -25 +26 @@
-@@ -2289,5 +2289,5 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
+@@ -2064,5 +2064,5 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
@@ -32,4 +32,0 @@
-@@ -7339,3 +7339,2 @@ show_mcast_macs(portid_t port_id)
- 	}
- }
--



More information about the stable mailing list