From: Damjan Marion Date: Tue, 13 Jun 2023 14:05:56 +0000 (+0200) Subject: avf: remove barrier X-Git-Tag: v24.02-rc0~134 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=cf1880284c7dce21711442aa210c0d5971bb5289 avf: remove barrier Type: improvement Change-Id: I95023d2e6034b77952e0423d0430b433ea0dab15 Signed-off-by: Damjan Marion --- diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h index 293a1a89937..f6f79cf0e09 100644 --- a/src/plugins/avf/avf.h +++ b/src/plugins/avf/avf.h @@ -428,7 +428,7 @@ avf_reg_write (avf_device_t * ad, u32 addr, u32 val) { if (ad->flags & AVF_DEVICE_F_ELOG) avf_elog_reg (ad, addr, val, 0); - *(volatile u32 *) ((u8 *) ad->bar0 + addr) = val; + __atomic_store_n ((u32 *) ((u8 *) ad->bar0 + addr), val, __ATOMIC_RELEASE); } static inline u32 diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index c405d2e31d1..dbe344ca278 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -156,7 +156,6 @@ avf_aq_desc_enq (vlib_main_t * vm, avf_device_t * ad, avf_aq_desc_t * dt, if (ad->flags & AVF_DEVICE_F_ELOG) clib_memcpy_fast (&dc, d, sizeof (avf_aq_desc_t)); - CLIB_MEMORY_BARRIER (); ad->atq_next_slot = (ad->atq_next_slot + 1) % AVF_MBOX_LEN; avf_reg_write (ad, AVF_ATQT, ad->atq_next_slot); avf_reg_flush (ad);