From: Feifei Wang Date: Thu, 14 Jan 2021 07:08:28 +0000 (+0800) Subject: app/eventdev: replace a barrier with thread fence X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=37f60fd6389c7b78887c24e131bee0ca0aab1ac1;p=dpdk.git app/eventdev: replace a barrier with thread fence Simply replace rte_smp barrier with atomic threand fence. Signed-off-by: Phil Yang Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang Acked-by: Pavan Nikhilesh --- diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index e7233e5a5b..9785dc3e23 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -98,11 +98,11 @@ perf_process_last_stage(struct rte_mempool *const pool, { bufs[count++] = ev->event_ptr; - /* wmb here ensures event_prt is stored before - * updating the number of processed packets - * for worker lcores + /* release fence here ensures event_prt is + * stored before updating the number of + * processed packets for worker lcores */ - rte_smp_wmb(); + rte_atomic_thread_fence(__ATOMIC_RELEASE); w->processed_pkts++; if (unlikely(count == buf_sz)) { @@ -122,11 +122,11 @@ perf_process_last_stage_latency(struct rte_mempool *const pool, bufs[count++] = ev->event_ptr; - /* wmb here ensures event_prt is stored before - * updating the number of processed packets - * for worker lcores + /* release fence here ensures event_prt is + * stored before updating the number of + * processed packets for worker lcores */ - rte_smp_wmb(); + rte_atomic_thread_fence(__ATOMIC_RELEASE); w->processed_pkts++; if (unlikely(count == buf_sz)) {