From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0060.outbound.protection.outlook.com [104.47.33.60]) by dpdk.org (Postfix) with ESMTP id 1AEC32B91 for ; Tue, 27 Dec 2016 10:50:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2rZCveIcbtdzLhTdptGxq2gC6MEyn9hubpuiRyG0udM=; b=Qxuv7khIHCFr6jxWqYLy73vjnygsWv/sTbcJ04m6lSiStlXL9wMUJIHah99Ee5mD8bQEYZtxqGMR+r6NwD4rJPRYUEorCX7i3BTsQ1IcBZdLKMikjc7STioC+qQ2K4+vmJm4A3TxGYakwOxFm1hzWpTWbzOLtaXAzxThBpKLXps= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (202.83.56.97) by BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Tue, 27 Dec 2016 09:50:22 +0000 From: Jerin Jacob To: CC: , , , , , , Jerin Jacob Date: Tue, 27 Dec 2016 15:19:06 +0530 Message-ID: <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.83.56.97] X-ClientProxiedBy: PN1PR01CA0001.INDPRD01.PROD.OUTLOOK.COM (10.164.137.8) To BLUPR0701MB1713.namprd07.prod.outlook.com (10.163.85.14) X-MS-Office365-Filtering-Correlation-Id: 85539a08-6a90-4678-5ff8-08d42e3dc807 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 3:uR3nGap2Y8CdTICyb2YNTJV34YHFmB3uppMvrq/tqNSeZ7n5gn4RflyFtBeTrl9TdyWVOAFAJs+qbmZ9lwNoQ7G2pMGzZly1/YtIWIMuMOqmja7y90Zp+5RmRvWC38ztyEj9SpWIM7eLClG/JzB5loaxnMvinfooa4p6irJE1r27zZZEnQ/KJV31BW7PykQb+8Hz4IY+oeEBmybivJUalHym8TcabHhBiTcFcplZ6tDcVDokT9NgPhJpVuPUX6ZI7RbnEjtdzel4Hvux8haXEw==; 25:rCDXek3I4CPK2Y2USF41n/3A+AoobNPQZSHYlaZwps3KKmogL6sDUhSFNeMluM7Czw4pKrIHqYw0A6qSRFnixdfBDZ9kwS4A98vwDXZErfemTk0ViWXA6KvZuXbh5GfW994HPAeQsus0wBBukeKRazwitB4+coWxLm1CrZrzRgwY0NkbkNm2xMsYL5zGKcw7f64jPTaZubDmvvUxjgeeydrMoIZjZP5BTQK36N03jLbkzqzIFOcfFuM/AOgKlavQJuOrfRghcRthYJmgdZGUdfkOz//y8ArKKQtY1rffddS2xq7xrdi5e+L7laJxsaz792OL5MQ8fST9NqzWUC9mUBIVAdq1RAwoGnuzQk1cGwSJXTvRmXBbThvtdP58wpk5DtH5IJFlGHHYLtTIzY/qEofuUIggTIWnU9lLYgIHmdFYT2LlWFIpeolAH+y6hqn4qGqH8uQtUpA4rDMtOIJQPg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 31:Ejo35kQGwVnpud0DU2nQHQthrZAOHBSg2JNfTa5mlOKQ6abxYq7Tm9segGZYD4f1UoJ94Hv85ivzZhCV2GJ+7YjNteBhXezuM7df5Qa1LipFMzzP78pR6TJxyv530rlBji7bvAiZHYIEqm49qlLdGK41b41VLRnuPPq3+e76kP+uyr20qFtfQN9SRMoDcKebaJxvr87MOY9cuJAu/7so5zoLbzBWme7hNZdYMW9fNqyEjP/tatvQZl2VhKoO6m2hZEF1Lk1XAUCGg76n/uqTzA==; 20:Pt2OWVDH8/LhtaIsoWmfphs9W5Tl7UacWejp5+3A6RJbU4y0GSgqSqLtXnWqU3l77fbBCv+sMLuwc+hiS9fAoBeMJNCQgqRkC0SlWzrLmRG7dSH7h/Wl4Sxsi08cpgGSl0h0AAwGjuuLaLYrIwa9fL4dY3X9YUeexMcAHN2ce04/8Lk1REV6ZSHLBZhmP/GytyQIFOaexQg+yxfoq2JCx0QQWLx1yE3rwFxW7X8pgYIJcKypE4GBu5/UV5zoQLUAU3NWwAcjvRydsUoK7JhYuUUoLgZCF/dFzqWNknKh7c+DG3PV9hMP/h2BXa9A0PFYOVtTPE5V9w8kzvFX7zWmEZ9I7A9QVGAwOYA15ySCPHU0Q+1chvU9h5DTnsLnyAJoeOU4sdFPxrlFQNXxCtiLreQfbXYqYvUJ2JDdjDSh7jeEzeOfI85lJ8NSn0FlHcK50HqFjyfJrPA+sEFdHPwPLt168yarxxK6QLQkXolcl6QVqIdlG2tDs1TRAjc5lBgyAVwa/tigwYOTAo/bfXY/quQvBovbrdZxeORhUmvsHKBjbsJDYkDq3p46h0UloOZ8F/B9JaQ1Hxi7ZN0TWaf3rR92e6ASHla8AK83vCx22Hk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123558021)(20161123564025)(20161123562025)(6072148); SRVR:BLUPR0701MB1713; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 4:i/esYSs9e1+FaUiCthyW5TszZQQKwe6bqn3YpDC2f5pxDBpnKPSkgo707C+nig+oUo8mjWtWkpi3aQo//Dh4gMQV0RxkGaRW/F5vyGLeLzJ8s90YLHPJq5Zq0F7DKXw/qS+9TQg7gf9g2XxVsokupsssi18ziGqzfx2XuF9zxQmM/rafoqCTVo8lDeZl4QA3BpZ5wR7AnLjArzhzC4vafjkA0R03NDyho/PuxvC4PWZ8xRgU7UpkAv0UB+BMQoaPbD2And5NGvpU2jGd3QkBDWIMggkfQXdz1RfCdrNOKSHjBy2HViYpGzk3QnuaOIxZyCGLp46p+DFwnvkr6xQ8sEEvnDL5O3Yeua3onSJPn/ukCLSOXdD6YUTDjgtGfWihE0w5PaxKB7jOTebOqH+nqy174503padidzaTVPLirLkZJwt2Luf54LFzrjnGAk1h9u/LDNhApFbD38mkrmvOJ/TL0d2qiOikTuhdTslN2VmlEF/ofQaSGLzv3VbhQFPlAJFg+EbOK5lGluA/DbVd1m2rs1LRfHw9tUfCHn9TeD+G9pHpA9W1MKR4W1zIpOo4+82k6jm6H0+B2Q/zp0piVYzk+CKynR1482ks9inkTYjeQ6zLPHRQOLbTBfZMOoZRniN3xVB7OjVGaAWqjg69nA== X-Forefront-PRVS: 0169092318 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(199003)(189002)(4001430100002)(3846002)(4326007)(6116002)(50986999)(76176999)(5003940100001)(6506006)(6512006)(6486002)(92566002)(2351001)(50466002)(110136003)(305945005)(8676002)(66066001)(2906002)(101416001)(81156014)(81166006)(42186005)(50226002)(68736007)(106356001)(36756003)(97736004)(33646002)(107886002)(48376002)(105586002)(38730400001)(7736002)(6916009)(5660300001)(42882006)(47776003)(25786008)(189998001)(1720100001)(2950100002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUP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IrvDm6UyhGsVS9TjF+cHky5AVLIZipWr1QbdLyggzjW4IQeNvTDhJBS/2e1rBLxXneE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 7:08BjXAKh+kak6w6oV/rt62V5e5W32cJJWpzIvvD5rqgK2UGzaJFMD3JOPpvnNy507aQMA5fDDdqBawutrv5uU5DLyVcksji3dT6q4JWN15nP1TFOAnfmeYzIRIPqJb/K4OQWRtNTw80StbxEu91hSI+ffHX4WkwKhu30vGUN99u8R0yQ+yw3aKAO53WU1OlLPs+5+86rESNgGF2PrXHmt5xn8q9s+YQImA9DFHjKoHT6UeN4KfVMgIst6QkiS8Kv6UL1FNwl3S5pyO8NWvo2dXLFxIErE2ft/49rcjvdYEi2Z1UYFN1GN1ri2gAimINaWt59EWgFTaTWyG52IwMjz4u4MFPJII2zQGqiiv1dCeHD8VDzSr2E5EXw4kx6dAxNEHaj0wgYhbRMQffgUo7dr2nwh3mvwSkciGWL+0xRpRQvnCpz8q8ZKiweHTrnd/E1ZKMm5eEzLCrvd5t3ru20iw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2016 09:50:22.3898 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: [dpdk-dev] [PATCH v2 00/29] introduce I/O device memory read/write operations 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: , X-List-Received-Date: Tue, 27 Dec 2016 09:50:26 -0000 v1..v2: 1) Changed rte_[read/write]b/w/l/q_[relaxed] to rte_[read/write]8/16/32/64_[relaxed](Yuanhan) 2) Changed rte_?mb to macros for arm64(Jianbo) 3) rte_wmb() followed by rte_write* changed to rte_wmb() followed by relaxed version(rte_write_relaxed) in _fast_ path to avoid an extra memory barrier for arm64 in fast path(Jianbo) 3) Replaced virtio io_read*/io_write* with rte_read*/rte_write*(Yuanhan) Based on the discussion in the below-mentioned thread, http://dev.dpdk.narkive.com/DpIRqDuy/dpdk-dev-patch-v2-i40e-fix-eth-i40e-dev-init-sequence-on-thunderx This patchset introduces 8-bit, 16-bit, 32bit, 64bit I/O device memory read/write operations along with the relaxed versions. The weakly-ordered machine like ARM needs additional I/O barrier for device memory read/write access over PCI bus. By introducing the EAL abstraction for I/O device memory read/write access, The drivers can access I/O device memory in architecture-agnostic manner. The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access. This patch-set split into three functional set: patch-set 1-9: Introduce I/O device memory barrier eal abstraction and implement it for all the architectures. patch-set 10-13: Introduce I/O device memory read/write operations Earl abstraction and implement it for all the architectures using previous I/O device memory barrier. patchset 14-28: Replace the raw readl/writel in the drivers with new rte_read[8/16/32/64], rte_write[8/16/32/64] eal abstraction Note: 1) We couldn't test the patch on all the Hardwares due to unavailability. Appreciate the feedback from ARCH and PMD maintainers. 2) patch 13/28 has false positive check patch error with ASM syntax ERROR:BRACKET_SPACE: space prohibited before open square bracket '[' #92: FILE: lib/librte_eal/common/include/arch/arm/rte_io_64.h:54: + : [val] "=r" (val) Jerin Jacob (15): eal: introduce I/O device memory barriers eal/x86: define I/O device memory barriers for IA eal/tile: define I/O device memory barriers for tile eal/ppc64: define I/O device memory barriers for ppc64 eal/arm: separate smp barrier definition for ARMv7 and ARMv8 eal/armv7: define I/O device memory barriers for ARMv7 eal/arm64: fix memory barrier definition for arm64 eal/arm64: define smp barrier definition for arm64 eal/arm64: define I/O device memory barriers for arm64 eal: introduce I/O device memory read/write operations eal: generic implementation for I/O device read/write access eal: let all architectures use generic I/O implementation eal/arm64: override I/O device read/write access for arm64 eal/arm64: change barrier definitions to macros net/thunderx: use eal I/O device memory read/write API Santosh Shukla (14): crypto/qat: use eal I/O device memory read/write API net/bnxt: use eal I/O device memory read/write API net/bnx2x: use eal I/O device memory read/write API net/cxgbe: use eal I/O device memory read/write API net/e1000: use eal I/O device memory read/write API net/ena: use eal I/O device memory read/write API net/enic: use eal I/O device memory read/write API net/fm10k: use eal I/O device memory read/write API net/i40e: use eal I/O device memory read/write API net/ixgbe: use eal I/O device memory read/write API net/nfp: use eal I/O device memory read/write API net/qede: use eal I/O device memory read/write API net/virtio: use eal I/O device memory read/write API net/vmxnet3: use eal I/O device memory read/write API doc/api/doxy-api-index.md | 3 +- .../qat/qat_adf/adf_transport_access_macros.h | 11 +- drivers/net/bnx2x/bnx2x.h | 26 +- drivers/net/bnxt/bnxt_cpr.h | 13 +- drivers/net/bnxt/bnxt_hwrm.c | 7 +- drivers/net/bnxt/bnxt_txr.h | 6 +- drivers/net/cxgbe/base/adapter.h | 34 ++- drivers/net/cxgbe/cxgbe_compat.h | 8 +- drivers/net/cxgbe/sge.c | 10 +- drivers/net/e1000/base/e1000_osdep.h | 18 +- drivers/net/e1000/em_rxtx.c | 2 +- drivers/net/e1000/igb_rxtx.c | 2 +- drivers/net/ena/base/ena_eth_com.h | 2 +- drivers/net/ena/base/ena_plat_dpdk.h | 11 +- drivers/net/enic/enic_compat.h | 27 +- drivers/net/enic/enic_rxtx.c | 9 +- drivers/net/fm10k/base/fm10k_osdep.h | 17 +- drivers/net/i40e/base/i40e_osdep.h | 10 +- drivers/net/i40e/i40e_rxtx.c | 4 +- drivers/net/ixgbe/base/ixgbe_osdep.h | 11 +- drivers/net/ixgbe/ixgbe_rxtx.c | 13 +- drivers/net/nfp/nfp_net_pmd.h | 9 +- drivers/net/qede/base/bcm_osal.h | 20 +- drivers/net/qede/base/ecore_int_api.h | 28 +- drivers/net/qede/base/ecore_spq.c | 3 +- drivers/net/qede/qede_rxtx.c | 2 +- drivers/net/thunderx/base/nicvf_plat.h | 36 +-- drivers/net/virtio/virtio_pci.c | 97 ++----- drivers/net/vmxnet3/vmxnet3_ethdev.h | 8 +- lib/librte_eal/common/Makefile | 3 +- .../common/include/arch/arm/rte_atomic.h | 6 - .../common/include/arch/arm/rte_atomic_32.h | 12 + .../common/include/arch/arm/rte_atomic_64.h | 57 ++-- lib/librte_eal/common/include/arch/arm/rte_io.h | 51 ++++ lib/librte_eal/common/include/arch/arm/rte_io_64.h | 159 +++++++++++ .../common/include/arch/ppc_64/rte_atomic.h | 6 + lib/librte_eal/common/include/arch/ppc_64/rte_io.h | 47 +++ .../common/include/arch/tile/rte_atomic.h | 6 + lib/librte_eal/common/include/arch/tile/rte_io.h | 47 +++ .../common/include/arch/x86/rte_atomic.h | 6 + lib/librte_eal/common/include/arch/x86/rte_io.h | 47 +++ lib/librte_eal/common/include/generic/rte_atomic.h | 27 ++ lib/librte_eal/common/include/generic/rte_io.h | 317 +++++++++++++++++++++ 43 files changed, 980 insertions(+), 258 deletions(-) create mode 100644 lib/librte_eal/common/include/arch/arm/rte_io.h create mode 100644 lib/librte_eal/common/include/arch/arm/rte_io_64.h create mode 100644 lib/librte_eal/common/include/arch/ppc_64/rte_io.h create mode 100644 lib/librte_eal/common/include/arch/tile/rte_io.h create mode 100644 lib/librte_eal/common/include/arch/x86/rte_io.h create mode 100644 lib/librte_eal/common/include/generic/rte_io.h -- 2.5.5