[1/6] app/test: fix unused but set variables
Checks
Commit Message
This patch fixes unused but set variables within the following test apps:
- test distributor perf
- test thash perf
Bugzilla ID: 881
Fixes: c0de0eb82e40 ("distributor: switch over to new API")
Fixes: 239fffe0402e ("test/thash: add performance tests for Toeplitz hash")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
app/test/test_distributor_perf.c | 3 ---
app/test/test_thash_perf.c | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -108,7 +108,6 @@ static int
handle_work(void *arg)
{
struct rte_distributor *d = arg;
- unsigned int count = 0;
unsigned int num = 0;
int i;
unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
@@ -120,11 +119,9 @@ handle_work(void *arg)
num = rte_distributor_get_pkt(d, id, buf, buf, num);
while (!quit) {
worker_stats[id].handled_packets += num;
- count += num;
num = rte_distributor_get_pkt(d, id, buf, buf, num);
}
worker_stats[id].handled_packets += num;
- count += num;
rte_distributor_return_pkt(d, id, buf, num);
return 0;
}
@@ -61,6 +61,9 @@ run_rss_calc(uint32_t *tuples[BATCH_SZ], enum test_rss_type type, int len,
}
end_tsc = rte_rdtsc_precise();
+ /* To avoid compiler warnings set hash to used. */
+ RTE_SET_USED(hash);
+
return end_tsc - start_tsc;
}