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

Xueming Li xuemingl at nvidia.com
Sat Dec 7 09:00:52 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.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 12/10/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1fb0641a6dbe0f1210756dd4ba5d538c27d24132

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 1fb0641a6dbe0f1210756dd4ba5d538c27d24132 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 ff2e9da324..9c3d668e56 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2219,7 +2219,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
 		for (act_n = 0, start = act;
 			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
 			policy.actions[i] = NULL;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:47.175511108 +0800
+++ 0094-app-testpmd-remove-redundant-policy-action-condition.patch	2024-12-06 23:26:44.113044826 +0800
@@ -1 +1 @@
-From 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d Mon Sep 17 00:00:00 2001
+From 1fb0641a6dbe0f1210756dd4ba5d538c27d24132 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +20,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 +24 @@
-index 28d45568ac..4e7fb69183 100644
+index ff2e9da324..9c3d668e56 100644
@@ -25 +27 @@
-@@ -2288,7 +2288,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
+@@ -2219,7 +2219,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
@@ -34,5 +35,0 @@
-@@ -7338,4 +7338,3 @@ show_mcast_macs(portid_t port_id)
- 		printf("  %s\n", buf);
- 	}
- }
--


More information about the stable mailing list