patch 'examples/performance-thread: remove unused hits count' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:32 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh at intel.com>
Date: Mon, 15 Nov 2021 17:58:55 +0000
Subject: [PATCH] examples/performance-thread: remove unused hits count
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 130e99db590073dd58da7e5c32dec8c2181527dd ]

Reported by clang 13.
This patch removes the hits variable from the cpu_load_collector function
within the performance thread example app as it is an unused but set
variable.

Bugzilla ID: 881
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Reported-by: Liang Longfeng <longfengx.liang at intel.com>
Signed-off-by: Conor Walsh <conor.walsh at intel.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 9830efb96f..081a3fa0d2 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1885,7 +1885,6 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 static int __rte_noreturn
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
-	uint64_t hits;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	uint64_t total[MAX_CPU] = { 0 };
 	unsigned min_cpu = MAX_CPU;
@@ -1975,12 +1974,10 @@ cpu_load_collector(__rte_unused void *arg) {
 			printf("cpu#     proc%%  poll%%  overhead%%\n\n");
 
 			for (i = min_cpu; i <= max_cpu; i++) {
-				hits = 0;
 				printf("CPU %d:", i);
 				for (j = 0; j < MAX_CPU_COUNTER; j++) {
 					printf("%7" PRIu64 "",
 							cpu_load.hits[j][i] * 100 / cpu_load.counter);
-					hits += cpu_load.hits[j][i];
 					cpu_load.hits[j][i] = 0;
 				}
 				printf("%7" PRIu64 "\n",
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.862072127 +0800
+++ 0028-examples-performance-thread-remove-unused-hits-count.patch	2021-11-28 22:41:03.243542368 +0800
@@ -1 +1 @@
-From 130e99db590073dd58da7e5c32dec8c2181527dd Mon Sep 17 00:00:00 2001
+From 0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 130e99db590073dd58da7e5c32dec8c2181527dd ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 3a6a33bda3..8a35040597 100644
+index 9830efb96f..081a3fa0d2 100644
@@ -34 +36 @@
-@@ -1972,12 +1971,10 @@ cpu_load_collector(__rte_unused void *arg) {
+@@ -1975,12 +1974,10 @@ cpu_load_collector(__rte_unused void *arg) {


More information about the stable mailing list