app/eventdev: replace a barrier with thread fence
Simply replace rte_smp barrier with atomic threand fence. Signed-off-by: Phil Yang <phil.yang@arm.com> Signed-off-by: Feifei Wang <feifei.wang2@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
This commit is contained in:
parent
9e9cf349fa
commit
37f60fd638
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user