]> git.droids-corp.org - dpdk.git/commitdiff
examples/performance-thread: remove unused hits count
authorConor Walsh <conor.walsh@intel.com>
Mon, 15 Nov 2021 17:58:55 +0000 (17:58 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 16 Nov 2021 12:02:27 +0000 (13:02 +0100)
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")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
examples/performance-thread/l3fwd-thread/main.c

index 3a6a33bda3b024d4b326a2dc619079cf137daa95..8a35040597667bd02e44371c37ec20a12d70c981 100644 (file)
@@ -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;
@@ -1972,12 +1971,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",