From patchwork Mon Jul 6 23:43:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 234899 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp411190ilg; Mon, 6 Jul 2020 16:43:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfXwVwbdLVicE9C2v3HSlIlEqtKlITsFDs1kwvYWTNW2suMOCIjK8f6DKcUcCcoZPA44pL X-Received: by 2002:a25:30d5:: with SMTP id w204mr25310735ybw.405.1594079032127; Mon, 06 Jul 2020 16:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594079032; cv=none; d=google.com; s=arc-20160816; b=FiIvsJy6xsTAQfNzxzGHavRpksLF+r182ns90K42UICYujjiwjWid6TrJPnurUDipI tifPHX0mG4s2V2sD+ZiFSfLzzO2YZe9UqzAcPTRrR3rLvWlcxSEgl2FoA2JrqKWdGol1 T9ACjf4dmqJ0f4KGXTSMRmAEYLsBrsqu0K4oEi9F9J1L4Z0cLELE/P1ZRzLe0mYSNFZl IcHwv5Pvucr6fHRZWMyrd0eWhSuHcjDd2POnPZ2+30bLwu5H/Qoj8N4SniEXH3M0vl+S x+e92sCtSb0nPG0QLL/fuNwSH3i5FkLaTx4YJn3GNDO2aYEWldyOC90BharFCMfEr4tb 03zA== 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=KaciL88zdJVUa7i7AhHkk2oWaH+vmul2SxmvcR0ChnwiZ19UTpJ9vn/MjBweHaD3+C CSHNtdaJ7EYmlSJH7+ByToH5yhsU917+/92tSzodWN5er3KfxJzDtIjhDibjCBSzXyhM dTAbJVSm8aSmuHuUT4muxQOUBpenqKLP3y1Poop0zthISqU+jrRqHCflY8eTbTPeI7fg ARAfnKuAzi10IZ0e0TKKAkrFbX35qXaiixe+L32MgtlV0Fv/4B+5vIhKND+qHVxfXbdF bcUmUYrjD8LPKEyJZjzY4KwhKRl7cFpXFnEk7064+H/uOpycyUrWZUO0pyhHMeo/3I7y drpQ== 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 a12si5079542ybp.210.2020.07.06.16.43.51; Mon, 06 Jul 2020 16:43:52 -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 518531DC7E; Tue, 7 Jul 2020 01:43:50 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 2FA081DC0F for ; Tue, 7 Jul 2020 01:43:49 +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 908E4C0A; Mon, 6 Jul 2020 16:43:48 -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 7CB693F718; Mon, 6 Jul 2020 16:43:48 -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: Mon, 6 Jul 2020 18:43:31 -0500 Message-Id: <20200706234333.26310-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 v4 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 Mon Jul 6 23:43:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 234900 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp411249ilg; Mon, 6 Jul 2020 16:43:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqixioGtNwu02xNi8IJ3CxUd4Vc1XwUurMDSvsctP2I8OM9S51wE9k5v6FYfaAX27y2FmE X-Received: by 2002:a25:2604:: with SMTP id m4mr80549024ybm.470.1594079038333; Mon, 06 Jul 2020 16:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594079038; cv=none; d=google.com; s=arc-20160816; b=CzouZnYomIXGrgHPl5w8CgRzpat01HJ9yH8dCgePgD6Xv24MVbhgofpeDRxV+zr/kb vkn3B5Fl2VcwTHOuwRinujWPxvFwgdO7Sq8M6mYEzJVIcB2tcyv2szOLOVRbIqs4kjTp M+fjP91Pk8HB/cBx7lDseptWRyW4OQLpePsn1TOQ1WsI/94zfnIr3xJmZ18BYljURBpl iDk6W36tk6C+hHtkF5yL6bioJseOn4M8ZnG04rVsqghe+dNrj6IqwOPnr9e89NxvS54k GxneZRsqc2rCnI+Tc6FqPoxDvS2fPvq7Hykti+6UYqg0HRFzc4zZk0TbIhjcqbO5J0u8 1Z+g== 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=LkHRzXzVLyUftXMR1hZfxdg9u9Z/3Kra/zhHCpovpV0=; b=M+eQ5XKFfc9AI8efHa+z4tYPYvUT+4sCZzHHGzXKJRsNlxOGKRgyXKzLJDxxTwlNEq y+rb/0Jz7nyqdKCDGJyauvWWd5tCIvTOwjYb2ZQ7FvcCUNGFj5bBMi+TwSFqvWcmo/Va F3LZtoU+A85aUUf3hk3VbPn1NOJnCfUODjFKdyxUhItCgxWZnS1bzeDjkOVqoPXX99+N 4dJUmrQhuAqayd5FzP8RSpsK+bDApvw5/SSWbF7k90Rb4fn6seGcWCNNKTU9BN4v3okN vydSIAxvEir3srDFhze2dGAzmX9GqbiThMYZ08ZoL3mqwsBf19NdnH5w78DmfuxTLDS7 j0NQ== 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 h4si20579455ybm.156.2020.07.06.16.43.58; Mon, 06 Jul 2020 16:43:58 -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 962961DC8B; Tue, 7 Jul 2020 01:43:55 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 9D0E91DC8A for ; Tue, 7 Jul 2020 01:43:54 +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 2D93AC0A; Mon, 6 Jul 2020 16:43: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 2518A3F718; Mon, 6 Jul 2020 16:43: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: Mon, 6 Jul 2020 18:43:32 -0500 Message-Id: <20200706234333.26310-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706234333.26310-1-honnappa.nagarahalli@arm.com> References: <20200410164127.54229-1-gavin.hu@arm.com> <20200706234333.26310-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v4 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 Acked-by: Jerin Jacob --- doc/guides/rel_notes/release_20_08.rst | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 5cbc4ce14..567ae6b2a 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 for Armv8-a.** + + 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 Mon Jul 6 23:43:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 234901 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp411316ilg; Mon, 6 Jul 2020 16:44:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1HC1CGXzDmxFKPhgahipZL0aCSIQiaxRYmEg1sJUNbHnUUYmyZ3wAOTNTaKJCfN0X/Ja1 X-Received: by 2002:a25:d251:: with SMTP id j78mr79193043ybg.242.1594079045354; Mon, 06 Jul 2020 16:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594079045; cv=none; d=google.com; s=arc-20160816; b=iiIXDyE2Pw5kstPrFA7HbG+Rz0NdrFzDKOz+h9jL6ZB6jOJwdPS19lA/PqEuhGNXoz De8pxIqVLyXo4y+c9pqsikSI0hKdZmtY8mWednznpVIInbL2TQZScYu9Bq23yc/gVXPw DXpHvDMchJiMSqRrgiWvpzYxxn7U5Z5G3gEdznLf8Kqa4R0RZVAVQnSYAPvpLvyVERJR Fm3ABObTAtJhzb4wYz3NXjjgWZbNQy2DP9QeCXOvONM1Yhvl/TGdB5sUb9z5LWf2ynpQ SdvP4rYxRnzDKc4h1B6Z4wqR5c31AHzVU8o7pKyPeTwTVbdQF/jmmTRl/UOso3QIODuQ OSIQ== 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=9c0clD0QvyRu/IM2tmyGWxWADeIL2bWDEKbw7GCQPk8=; b=wKQPzYKxaXaHrr9YG4z6XeJmjgl1/pvuP7PS5BN0xGFpeYyWdEab4WztYg+NwS2bxS UwuvP+8Uq/Rg1Bu8UTXFZJDf7+xK6eyFLklW58caxb03ApupLOIj++nlVaI1UVDZvv3l 9wrH79ojhV4VeTStz+LoVRSq6yAzAvdfGgjtr+vHlhTfEljy8bPbcmpPcLpA71917i79 em3maeCkVvv4Vu4Qe2Y80vH2JdmAFHR+6fLog8CwyIHv0zQF2RVoFxEhiUgaADVtAJ1C wQRZyQs9F9HMgv3KEE9oAjKfw8QBd0AlRJHWEyEBvl7j/g149mZU/UzU3GnuoHVxKM7P E4+g== 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 n184si24778959ybc.403.2020.07.06.16.44.05; Mon, 06 Jul 2020 16:44:05 -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 D04B51DC98; Tue, 7 Jul 2020 01:43:58 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id BD6C01DC91 for ; Tue, 7 Jul 2020 01:43: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 49F62D6E; Mon, 6 Jul 2020 16:43:55 -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 4181D3F718; Mon, 6 Jul 2020 16:43:55 -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: Mon, 6 Jul 2020 18:43:33 -0500 Message-Id: <20200706234333.26310-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706234333.26310-1-honnappa.nagarahalli@arm.com> References: <20200410164127.54229-1-gavin.hu@arm.com> <20200706234333.26310-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v4 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 Acked-by: Jerin Jacob --- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Reviewed-by: David Christensen Reviewed-by: David Christensen 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