patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Gavin Hu <gavin.hu@arm.com>
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
Subject: [dpdk-stable] [PATCH RFC v1 3/7] net/ena: relax the rmb for DMA
Date: Fri, 13 Mar 2020 17:18:31 +0800	[thread overview]
Message-ID: <20200313091835.58039-4-gavin.hu@arm.com> (raw)
In-Reply-To: <20200313091835.58039-1-gavin.hu@arm.com>

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 <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@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


  parent reply	other threads:[~2020-03-13  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200313091835.58039-1-gavin.hu@arm.com>
2020-03-13  9:18 ` [dpdk-stable] [PATCH RFC v1 1/7] net/ena: remove duplicate barrier Gavin Hu
2020-03-13  9:18 ` [dpdk-stable] [PATCH RFC v1 2/7] net/ena: relax the barrier for doorbell ring Gavin Hu
2020-03-13  9:18 ` Gavin Hu [this message]
2020-03-13  9:18 ` [dpdk-stable] [PATCH RFC v1 7/7] net/ena: remove duplicate memset Gavin Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200313091835.58039-4-gavin.hu@arm.com \
    --to=gavin.hu@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=gtzalik@amazon.com \
    --cc=igorch@amazon.com \
    --cc=joyce.kong@arm.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=nd@arm.com \
    --cc=phil.yang@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).