From patchwork Fri Jul 3 18:57:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 231989 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2644126ilg; Fri, 3 Jul 2020 11:57:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEoPDK+miaShisaevIQmVY5xRsGHzuQDTC48b2lXyUpn61beYf3+H/oRl55Y00pGdfRrmO X-Received: by 2002:a1c:f714:: with SMTP id v20mr36912628wmh.81.1593802677574; Fri, 03 Jul 2020 11:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593802677; cv=none; d=google.com; s=arc-20160816; b=JqkmG5mrpBbd4fdQPVxbX+DMyT6ZTyG6w8dT/e2VuKuU1iKjgXokWUq8Y3gINuabaN vM9u0Aa3lRe4SWmtek8wwe/ZDN42thRx+T+lLFxRdPSLkaAxDubTLaaeYKNBHPrOp2Tw uoBElaS21l0xjg7SJlwX11DN+AqN5WQJJKHkngQd+L/blOoBgQ2ZAremKwu6ZALpb6Se p5iMixkPseX1SWe33igW3M+E2eDtn6+IulaRD4vprsFK9qXhsxH0W06lhXQKwiirC7ON uBsDREtdnKxrSZ3UxIWjEllsKHzZSoC3ldCUGt/wzoPVzE+fYDaPIWrn3bL2hI0BvwWr VSnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=aSRPs1KfPYlb/C8yuxHSi+HPKYEHFzGANuANTRuIIuI=; b=QVJuh3mqE4XLP/dySBE4QxzzsBl8N9qa91rv8JK+deBAkvuYiI6+jKsmP1yWulf79K EpYmwYtyWdb5uMN3KFROlJhx0e9TDFOjDs4Lm4RHyaJHoP7wQDkokuoLol9Jh25uTyvg 3acMX8y4toGE+0Ob0gTR/1HPHrCPowlroKrxFHf5KCe36zO510wml1sU0X7qP0Wfe0Fk PNtnGBp/7OnKEASfRtHkZu/JeaRdFtoGEUTS3LXnXhxWGfx331SPLUHaUyRWRjwW/agx EtAedrwQVgafJbCD5KSwuyRpUSmNmADqnNU00I22fVyUOjEApMkoF4THODHA+RglEonl 3DTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id h17si11593733wrh.484.2020.07.03.11.57.56; Fri, 03 Jul 2020 11:57:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 234D41DCD3; Fri, 3 Jul 2020 20:57:56 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 252DF1DCD1 for ; Fri, 3 Jul 2020 20:57:55 +0200 (CEST) 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 7F27F2F; Fri, 3 Jul 2020 11:57:54 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B3313F68F; Fri, 3 Jul 2020 11:57:54 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, jerinj@marvell.com, hemant.agrawal@nxp.com, ajit.khaparde@broadcom.com, igorch@amazon.com, thomas@monjalon.net, viacheslavo@mellanox.com, arybchenko@solarflare.com, bruce.richardson@intel.com Cc: nd@arm.com Date: Fri, 3 Jul 2020 13:57:39 -0500 Message-Id: <20200703185741.22184-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410164127.54229-1-gavin.hu@arm.com> References: <20200410164127.54229-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH v3 1/3] eal: adjust barriers for IO on Armv8-a 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" Change the barrier APIs for IO to reflect that Armv8-a is other-multi-copy atomicity memory model. Armv8-a memory model has been strengthened to require other-multi-copy atomicity. This property requires memory accesses from an observer to become visible to all other observers simultaneously [3]. This means a) A write arriving at an endpoint shared between multiple CPUs is visible to all CPUs b) A write that is visible to all CPUs is also visible to all other observers in the shareability domain This allows for using cheaper DMB instructions in the place of DSB for devices that are visible to all CPUs (i.e. devices that DPDK caters to). Please refer to [1], [2] and [3] for more information. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=22ec71615d824f4f11d38d0e55a88d8956b7e45f [2] https://www.youtube.com/watch?v=i6DayghhA8Q [3] https://www.cl.cam.ac.uk/~pes20/armv8-mca/ Signed-off-by: Honnappa Nagarahalli Acked-by: Jerin Jacob Tested-by: Ruifeng Wang --- lib/librte_eal/arm/include/rte_atomic_64.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h index 7b7099cdc..e42f69edc 100644 --- a/lib/librte_eal/arm/include/rte_atomic_64.h +++ b/lib/librte_eal/arm/include/rte_atomic_64.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2015 Cavium, Inc - * Copyright(c) 2019 Arm Limited + * Copyright(c) 2020 Arm Limited */ #ifndef _RTE_ATOMIC_ARM64_H_ @@ -19,11 +19,11 @@ extern "C" { #include #include -#define rte_mb() asm volatile("dsb sy" : : : "memory") +#define rte_mb() asm volatile("dmb osh" : : : "memory") -#define rte_wmb() asm volatile("dsb st" : : : "memory") +#define rte_wmb() asm volatile("dmb oshst" : : : "memory") -#define rte_rmb() asm volatile("dsb ld" : : : "memory") +#define rte_rmb() asm volatile("dmb oshld" : : : "memory") #define rte_smp_mb() asm volatile("dmb ish" : : : "memory") @@ -37,9 +37,9 @@ extern "C" { #define rte_io_rmb() rte_rmb() -#define rte_cio_wmb() asm volatile("dmb oshst" : : : "memory") +#define rte_cio_wmb() rte_wmb() -#define rte_cio_rmb() asm volatile("dmb oshld" : : : "memory") +#define rte_cio_rmb() rte_rmb() /*------------------------ 128 bit atomic operations -------------------------*/ From patchwork Fri Jul 3 18:57:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 231990 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2644210ilg; Fri, 3 Jul 2020 11:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSxiIBJzEBI/CohVJXJN5aeFxdBvIPmtRlVQMl5qS43lged2LJpPYTIw3NqZfXW64CMnjH X-Received: by 2002:a5d:60c7:: with SMTP id x7mr35494709wrt.138.1593802684070; Fri, 03 Jul 2020 11:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593802684; cv=none; d=google.com; s=arc-20160816; b=mAo7oKCx0g63XMnU1/bOaBWDLFrgdJP42HMDp5XspkbuMDU/ZEuryExQeztHWHiLwg 5FnzOi1/vI9xr45D2LR8VdK8Di/Rge3rJx+6SFkb9BG7MLSJIZzKr2mS7SEhA3opw456 FgGSqO1z7mcxdt60Dt7WeGJHspe6DpDijUpKlPoXHKz8NtGyIYsbXHw/iTrUGZpQsFFG XF3LoNDOdoFOTya7LWdFCIWADDZ/vb60ZHFfIGadL1MQMLKHsAN+LlPXPAW/o3Nmg54n 21EYMCoG3ffzZgJC0q4lWSbzni26gw8hpt196HYdMAZMHLNJwnXK9Ku0BuaiqzjK3Bs6 EuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=wYnH6cJSFW6olyk8h8aH9JsRqtrvWEAGVkPALGY1YFY=; b=IpLuM01AaOjhr3k8T58ex2BrC4ywCVlx4X+HKRAUioEfZmjAJfcXarFbE/urYnFrbq NyYY5azoh6EGPLb2bBxW4r2quULLQBet1OQXR1nqjRIhs64T07hCqVGzT0Dnh+OMOhvt yKydz34LvkCd/JhJYh/HqPTNQWdsAxyHh+NtD6uIKClJTBKIdAP9hwXHqox8/mXRM/xA BVpmmeB6460WrlzH9ahTXPhxkl+Kr0KvTRR4cCE0NiIP7incx+6UULlaFl1SrVdGdKs2 z9UmHPLejW19xQ/tlowNEUuiRZP27SYfexPHLmw9uIB14uOsEQnOvDAmjmNMmlX9u0I5 Sehw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y5si11576178wrq.347.2020.07.03.11.58.03; Fri, 03 Jul 2020 11:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E79F1DCE1; Fri, 3 Jul 2020 20:58:03 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id D46001DCE0 for ; Fri, 3 Jul 2020 20:58:01 +0200 (CEST) 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 4BDD62F; Fri, 3 Jul 2020 11:58:01 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 431DE3F68F; Fri, 3 Jul 2020 11:58:01 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, jerinj@marvell.com, hemant.agrawal@nxp.com, ajit.khaparde@broadcom.com, igorch@amazon.com, thomas@monjalon.net, viacheslavo@mellanox.com, arybchenko@solarflare.com, bruce.richardson@intel.com Cc: nd@arm.com Date: Fri, 3 Jul 2020 13:57:40 -0500 Message-Id: <20200703185741.22184-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703185741.22184-1-honnappa.nagarahalli@arm.com> References: <20200410164127.54229-1-gavin.hu@arm.com> <20200703185741.22184-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v3 2/3] doc: update armv8-a IO barrier changes 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" Updated the use of DMB instruction in rte_*mb APIs for Armv8-a. Signed-off-by: Honnappa Nagarahalli --- doc/guides/rel_notes/release_20_08.rst | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 Acked-by: Jerin Jacob diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 5cbc4ce14..15c21996d 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -56,6 +56,13 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **rte_*mb APIs are updated to use DMB instruction.** + + Armv8-a memory model has been strengthened to require other-multi-copy + atomicity. This allows for using DMB instruction instead of DSB for IO + barriers. rte_*mb APIs, for Armv8-a platforms, are changed to use DMB + instruction to reflect this. + * **Updated PCAP driver.** Updated PCAP driver with new features and improvements, including: From patchwork Fri Jul 3 18:57:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 231991 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2644289ilg; Fri, 3 Jul 2020 11:58:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhmmQmjSeXohj3By0xRl0wCcrVBHABamdMZtdIn2sdO1vMWcY5ZI9TJzpb247hEJ06Bn+0 X-Received: by 2002:a5d:4a01:: with SMTP id m1mr37581882wrq.250.1593802692602; Fri, 03 Jul 2020 11:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593802692; cv=none; d=google.com; s=arc-20160816; b=Z8283Qn+Uy7GuuntcQqtIPBa0blSrPbk1xO8JWTTJvTfZ45QzPhjXDgKPED3cCOHxu pURkObTvDM8ArwLywdfYWgERCUKWYoeIakdTHRmcJuPQP8cxJH9Shnlydh3HDbHkMVRX ZfpRa+v+na308keFMJnKI78reNx0AlKnmvgVW7jn9zA0WLPC1xb9uNWnvUZ7vb1w82uR ChQ5K6/tazzqdUbNcDmWKSI4dqNL5cgMmYjWq5cI75bUeOoV0tElVnuTPPSu4OE0MjiB PhuPNWu1ZBDhNSw/nmKH3bz/0AY4LrkFkPTlkVzmeC5pUFgpm9L79mg9PNXXduDOXDxL ZDwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=vTsYahIjZRDuCim65GlMLDV7A7befRs9K/H78cXRwwE=; b=hL6RSOpzSUNkkh8CgPhW8eROhENKCu7dBtFt4mTg6VzQjcUwqRT2byUBvdoRStG4DY 6aPzConksvWUDNTSK2STqhU1qnpfTafY8oZ6vbPA+UgqZkIcXel0ltOyz3WWRv1C0Hyi it1Ql6+EkgDaqX7WBPZ36g3+Sbns8H/zGEbzqnND+2JXuUxQtS/x6KsbFkTlfeEfqBZl HXmb0Prn20dxEcfZvbguszGF9GRTkKwdlmQpGHze2PFPFWKICufc6TZ9qwBaprwElv70 6wjEP1xFeGZ7xsBCxekZKgUFuMbrvXEQ58PjA2YqR3FwZ5YQQ4KQPI5vAZF99XmWF5h9 lYCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id k188si11829460wmb.82.2020.07.03.11.58.12; Fri, 03 Jul 2020 11:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 112A91DCEF; Fri, 3 Jul 2020 20:58:06 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id F2B771DCE0 for ; Fri, 3 Jul 2020 20:58:02 +0200 (CEST) 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 855461042; Fri, 3 Jul 2020 11:58:02 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CCBC3F68F; Fri, 3 Jul 2020 11:58:02 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, jerinj@marvell.com, hemant.agrawal@nxp.com, ajit.khaparde@broadcom.com, igorch@amazon.com, thomas@monjalon.net, viacheslavo@mellanox.com, arybchenko@solarflare.com, bruce.richardson@intel.com Cc: nd@arm.com Date: Fri, 3 Jul 2020 13:57:41 -0500 Message-Id: <20200703185741.22184-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703185741.22184-1-honnappa.nagarahalli@arm.com> References: <20200410164127.54229-1-gavin.hu@arm.com> <20200703185741.22184-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v3 3/3] doc: update deprecation of CIO barrier APIs 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" rte_cio_*mb APIs will be deprecated in 20.11 release. Signed-off-by: Honnappa Nagarahalli --- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Acked-by: Jerin Jacob Acked-by: Ajit Khaparde Acked-by: Konstantin Ananyev diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index d1034f60f..59656da3d 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,6 +40,12 @@ Deprecation Notices These wrappers must be used for patches that need to be merged in 20.08 onwards. This change will not introduce any performance degradation. +* rte_cio_*mb: Since the IO barriers for ArmV8-a platforms are relaxed from DSB + to DMB, rte_cio_*mb APIs provide the same functionality as rte_io_*mb + APIs(taking all platforms into consideration). rte_io_*mb APIs should be used + in the place of rte_cio_*mb APIs. The rte_cio_*mb APIs will be deprecated in + 20.11 release. + * igb_uio: In the view of reducing the kernel dependency from the main tree, as a first step, the Technical Board decided to move ``igb_uio`` kernel module to the dpdk-kmods repository in the /linux/igb_uio/ directory