test/ring_perf: fix error statistics in bulk enq/dequeue
PATCH 1/1 test/ring_perf: fix error statistics in bulk enq/dequeue
In size 32 bulk ring enq/dequeue performance test, the "Total count" statistics is incorrect. For example, running the test on lcore 25 and lcore 26, the output is as follows:
The test command:
$sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 25-26 RTE>>ring_perf_autotest
Bulk enq/dequeue count on size 32
Core [25] count = 288268
Core [26] count = 288281
Total count (size: 32): 1066323
Fixed it by reset the counter at the beginning of each loop. The revised output is as follows:
Bulk enq/dequeue count on size 32
Core [25] count = 285643
Core [26] count = 285688
Total count (size: 32): 571331
--- app/test/test_ring_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
app/test/test_ring_perf.c +2 -1
@@ -380,7 +380,7 @@ load_loop_fn_16B(void *p)static int run_on_all_cores (struct rte_ring *r,const int esize) { -uint64_t total =0 ; +uint64_t total;struct thread_params param;lcore_function_t *lcore_f;unsigned int i, c;
@@ -392,6 +392,7 @@ run_on_all_cores(struct rte_ring *r, const int esize)memset (¶m,0 ,sizeof (struct thread_params ));for (i =0 ; i <RTE_DIM (bulk_sizes); i++) { + total =0 ;printf ("\nBulk enq/dequeue count on size %u\n" , bulk_sizes[i]); param.size = bulk_sizes[i]; param.r = r;
Signature · 1 line
2.17.1
Quoted 46 lines
In size 32 bulk ring enq/dequeue performance test, the "Total count" statistics is incorrect. For example, running the test on lcore 25 and lcore 26, the output is as follows:
The test command:
$sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 25-26 RTE>>ring_perf_autotestBulk enq/dequeue count on size 32
Core [25] count = 288268
Core [26] count = 288281
Total count (size: 32): 1066323Fixed it by reset the counter at the beginning of each loop. The revised output is as follows:
Bulk enq/dequeue count on size 32
Core [25] count = 285643
Core [26] count = 285688
Total count (size: 32): 571331Fixes 759cf9b5632c ("test/ring: enhance mp/mc coverage")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Reviewed-by Phil Yang <[email protected]>--- app/test/test_ring_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)app/test/test_ring_perf.c +1
-1@@ -380,7 +380,7 @@ load_loop_fn_16B(void *p)static int run_on_all_cores (struct rte_ring *r,const int esize) { -uint64_t total =0 ; +uint64_t total;struct thread_params param;lcore_function_t *lcore_f;unsigned int i, c;
app/test/test_ring_perf.c run_on_all_cores(struct rte_ring *r, const int esize)
Quoted 8 lines
app/test/test_ring_perf.c +1
-1@@ -392,6 +392,7 @@ run_on_all_cores(struct rte_ring *r, const int esize)memset (¶m,0 ,sizeof (struct thread_params ));for (i =0 ; i <RTE_DIM (bulk_sizes); i++) { + total =0 ;printf ("\nBulk enq/dequeue count on size %u\n" , bulk_sizes[i]); param.size = bulk_sizes[i]; param.r = r; --
Quoted 1 line
2.17.1
David Marchand
AppliedQuoted 21 lines · Konstantin
Quoted 21 lines
In size 32 bulk ring enq/dequeue performance test, the "Total count" statistics is incorrect. For example, running the test on lcore 25 and lcore 26, the output is as follows:
The test command:
$sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 25-26 RTE>>ring_perf_autotestBulk enq/dequeue count on size 32
Core [25] count = 288268
Core [26] count = 288281
Total count (size: 32): 1066323Fixed it by reset the counter at the beginning of each loop. The revised output is as follows:
Bulk enq/dequeue count on size 32
Core [25] count = 285643
Core [26] count = 285688
Total count (size: 32): 571331
Quoted 7 lines
Quoted 6 lines
Fixes 759cf9b5632c ("test/ring: enhance mp/mc coverage")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Reviewed-by Phil Yang <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand