Skip to content

Commit

Permalink
examples/performance-thread: remove unused hits count
Browse files Browse the repository at this point in the history
[ upstream commit 130e99d ]

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: d48415e ("examples/performance-thread: add l3fwd-thread app")

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>
  • Loading branch information
conorwalsh-intel authored and cpaelzer committed Nov 30, 2021
1 parent 7866535 commit 43442ef
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/performance-thread/l3fwd-thread/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,6 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
static int __attribute__((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;
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 43442ef

Please sign in to comment.