From: Honnappa Nagarahalli Date: Tue, 1 Oct 2019 05:32:53 +0000 (-0500) Subject: test/lpm: fix measured cycles for delete X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c425fb6b9b3264dfe5d212fe80151cfd800b907c;p=dpdk.git test/lpm: fix measured cycles for delete total_time needs to be reset to measure the cycles for delete API. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Acked-by: Vladimir Medvedkin Tested-by: Vladimir Medvedkin --- diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index 77eea66ade..a2578fe90e 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -460,7 +460,7 @@ test_lpm_perf(void) (double)total_time / ((double)ITERATIONS * BATCH_SIZE), (count * 100.0) / (double)(ITERATIONS * BATCH_SIZE)); - /* Delete */ + /* Measure Delete */ status = 0; begin = rte_rdtsc(); @@ -470,7 +470,7 @@ test_lpm_perf(void) large_route_table[i].depth); } - total_time += rte_rdtsc() - begin; + total_time = rte_rdtsc() - begin; printf("Average LPM Delete: %g cycles\n", (double)total_time / NUM_ROUTE_ENTRIES);