From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F0D7A0567; Fri, 13 Mar 2020 10:20:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 924AE1C065; Fri, 13 Mar 2020 10:20:00 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id AD1C91BFBF; Fri, 13 Mar 2020 10:19:59 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3055331B; Fri, 13 Mar 2020 02:19:59 -0700 (PDT) Received: from net-arm-thunderx2-04.shanghai.arm.com (net-arm-thunderx2-04.shanghai.arm.com [10.169.40.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 710133F67D; Fri, 13 Mar 2020 02:19:54 -0700 (PDT) From: Gavin Hu To: dev@dpdk.org Cc: nd@arm.com, david.marchand@redhat.com, thomas@monjalon.net, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, mw@semihalf.com, Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com, joyce.kong@arm.com, stable@dpdk.org Date: Fri, 13 Mar 2020 17:18:31 +0800 Message-Id: <20200313091835.58039-4-gavin.hu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313091835.58039-1-gavin.hu@arm.com> References: <20200313091835.58039-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH RFC v1 3/7] net/ena: relax the rmb for DMA X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: stable@dpdk.org Signed-off-by: Gavin Hu Reviewed-by: Honnappa Nagarahalli --- 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