The user space DPDK rte_cio_rmb barrier in definition corresponds to the kernel dma_rmb barrier on all supported architectures[1][2][3].
As it is called in the data path[4], redefine it to relax the barrier and uplift the performance. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/tree/arch/x86/include/asm/barrier.h?h=v5.5#n54 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/tree/arch/powerpc/include/asm/barrier.h?h=v5.5#n46 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/tree/arch/arm64/include/asm/barrier.h?h=v5.5#n48 [4] http://code.dpdk.org/dpdk/v20.02/source/drivers/net/ena/ ena_ethdev.c#L2021 Fixes: b68309be44c0 ("net/ena/base: update communication layer for the ENAv2") Cc: sta...@dpdk.org Signed-off-by: Gavin Hu <gavin...@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> --- drivers/net/ena/base/ena_plat_dpdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index b611fb204..60327a726 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -254,7 +254,7 @@ extern uint32_t ena_alloc_cnt; #define msleep(x) rte_delay_us(x * 1000) #define udelay(x) rte_delay_us(x) -#define dma_rmb() rmb() +#define dma_rmb() rte_cio_rmb() #define MAX_ERRNO 4095 #define IS_ERR(x) (((unsigned long)x) >= (unsigned long)-MAX_ERRNO) -- 2.17.1