app/eventdev: fix SMP barrier in performance test
authorFeifei Wang <feifei.wang2@arm.com>
Thu, 14 Jan 2021 07:08:26 +0000 (15:08 +0800)
committerJerin Jacob <jerinj@marvell.com>
Tue, 26 Jan 2021 13:39:08 +0000 (14:39 +0100)
commitc7c033d173f2d4f14834c0fb942b84725ac940e8
tree7020ca2c529caf74ebdf83a63196e4225176c796
parentf3527e0b97ae4adf2e1871e6f67b17968b4a9486
app/eventdev: fix SMP barrier in performance test

This patch fixes RTE SMP barrier bugs for the perf test of eventdev.

For the "perf_process_last_stage" function, wmb after storing
processed_pkts should be moved before it. This is because the worker
lcore should ensure it has really finished data processing, e.g. event
stored into buffers, before the shared variables "w->processed_pkts"are
stored.

For the "perf_process_last_stage_latency", on the one hand, the wmb
should be moved before storing into "w->processed_pkts". The reason is
the same as above. But on the other hand, for "w->latency", wmb is
unnecessary due to data dependency.

Fixes: 2369f73329f8 ("app/testeventdev: add perf queue worker functions")
Cc: stable@dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
app/test-eventdev/test_perf_common.h