From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0043.outbound.protection.outlook.com [104.47.41.43]) by dpdk.org (Postfix) with ESMTP id C57E72A5D for ; Wed, 14 Dec 2016 02:57:12 +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=jNafUkf3mICexktUAstZNX6SLCu7rQv9vwqRPs6upCI=; b=hy0ZjeywKoLv1qunIpR4Ld1TQI23ExsL33K1uwftc3RcT9L+y2fd8QqqhO5n6NlX8X/E1MbexXaMdi4ko9ojPk9ZarvrOAiS903cHu86OwRnL7oc87OQzmpeicqLhRkQCCCz3BZnuSuJsMES5ceVT1rdr22guE1Mmxq0umC2gBw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (122.166.91.229) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Wed, 14 Dec 2016 01:57:06 +0000 From: Jerin Jacob To: CC: , , , , , Jerin Jacob Date: Wed, 14 Dec 2016 07:25:30 +0530 Message-ID: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.91.229] X-ClientProxiedBy: MAXPR01CA0006.INDPRD01.PROD.OUTLOOK.COM (10.164.147.13) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: c84c05d0-165e-4691-8030-08d423c48397 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagn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/712Dnl; 20:8DTEADnkrCXZL7bq8v48LS3+JExs6h70i/dmcLONBTq/K6gQhjB9msNN0WRohG0HGYhqEGYosHOc/QWfesFjiWFqOXIYWdb8m1fPAculGsGhudfaapb6PtOqdEvrHJIll+wOb8i+s+CygTwhx5IKqwMw2+vXQqmFD+hC+0nWgb80psZvhb1n59/16AZ9/CUCeQKoPwWobohejd9YfHzHVHwpOMtV4eQGwu9lE5Qm79jsQ2JkgqA37IplHBWdJBMl04PLnUsk8Rgmnxsg+BIsn0jeQO1eIi87Nj29gYX7LdQ3SeiNfBwwTmqGcfilFyUGVTO+he7l6D+85UnV5xlu+hnmfVyVGbqELTiNdlvWIPyNFbLp5BLfEM1IcL/GwD1D7WMrjUDGEH9qCepoLaYu4RU72tEimfLXmZH1n0DiZ1rN5MTAr6dTdjZaj5oie0SN3LvdPgFLA7S2OlI8eiDjlxJb377I1aclBhr1n0MHB9DaaiwhNKpxCpddwBdadwGL4XFgKxXHRPZApZh8TtEcYgE3yP3gz3xtpvYGGhNTEz2k5UZ3JSTzLKGFFVVDsiI8gqnWMNkrxsON9a4bAcv57/D1Mqb3CE0CknX0dZtB95s= 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)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:VE2VSzuTCMBKbFk7bBNJHwmkr1PO93RFry53rzfKiRqiMsjgmibsEjM1N3PWGU5nMSUPdO/axMcdQVyMQaxDLiCpHXqoBxidxVzx2houCcWgTSi+GFwfiftSmcYTBMY4/mijmMwdyhwrABO4ygbGHlsgfV9jdwQwHeYODRMKZ0t+5QLImzu7q9KwViEjhggnsn8IGwmvytJcb4CNEMNcOdHm96Pliym/0S0Dlh+9lMi+Tl3v4yB50whumf26R/2hmqS1I+v4DQuJKVKtViGPmXtItROnTBBR0xVYFgUTsmJP8uvRQlPENkB/Qxr3IGKDHNnrzFjPKyFYsGRXnJYXYFcRMildjCncvAPzGqpKQ20uyLXfiYoF8ceWo9+8GPsVOVpWQNYhR1s+2iov554Wk2HV07aBa6WrECIMsgbpOjJJGW6b+Xpo4DlU4g1sB3YoJsYf7IJuS2SuPRqik4l+O6n+IaXPmYeHjipWrQlxrqMh+1VPzOcyv656GaWFPKUKLjlbxqRlLJjo6ikQQiE3Orzrqtea4AC0A6IFOmrpid/iHZ48M8IOT8rk9Sr+HmM/+fVh0CPIu/DbN1X5DMMvDL2HKfO2b/ESUu9KnnXqN9s= X-Forefront-PRVS: 01565FED4C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(39840400002)(39410400002)(189002)(199003)(6116002)(6512006)(6506006)(6486002)(3846002)(66066001)(68736007)(47776003)(92566002)(5003940100001)(50986999)(81156014)(50226002)(2906002)(110136003)(33646002)(6916009)(101416001)(42882006)(6666003)(4326007)(4001430100002)(81166006)(38730400001)(105586002)(8676002)(1720100001)(106356001)(5660300001)(107886002)(305945005)(48376002)(97736004)(50466002)(36756003)(2351001)(42186005)(7736002)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BN3PR0701MB1719; 23:zkWzUk7piAChB2LgrFbhwf7O0YOLq45lknkmEoU?= =?us-ascii?Q?cN/KmaQrmje/TdTAoGqdfVP0b70argFNST4Km2e0wYp0OSzfin1HMGGKIY7v?= =?us-ascii?Q?GZbg2ujqkNaHUNkzaS+CNg3lag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CfkF?= =?us-ascii?Q?dCHrfQTZq1sofg4APCkbNirTfylkPHc5BJqRfblxsdHJr7iesiju9KQpiEsE?= =?us-ascii?Q?RpzCfvin2KaHSPUb3Sd8xCl6vZMHL8+KtjrqeQxecnrBc7Uy6NsDzekFwNWW?= =?us-ascii?Q?ue9HQwt3g0Qvl2aWwon9TuYIxWCoU2WpASE74JZzU8TfkxI3TcMS2Eea9m8l?= =?us-ascii?Q?JKZKgw9sK3Xv56R4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 6:vzLKCEbrauF0AmNIHVw4l3BYmKbUQMc/4QU/YgSrIlWPobcPnFrKct2n4LT6FfVB3NlgGHtpBAFA26EvO9Dd7v30jgus98i6hW/+IxA1wmysIieZf0MBbx6OwKmSyKPlyFxA+Xm3fz9YTyrT6xnr35V8ENQNPd+AvYxBNz1Z3DI3nA+kmILrNb+8NZo8kHOnH5AQ4Vm6xpJFrvmCRnJ2pDLWuqReciyocq60WlSj59O2RgUWSd1CW8KyjyLXgL7o7Swcu4X+NZDGXdpmUUw9+s/xXKp2d/rEEZJQmEB1Ksa9NjhCihoGsHszp1k3LFHpPAeZ3BjneXFlrkmLG15jIeaerVfSZ5LMlrPl0/ZQtQR/zR0agHkD8FgI1C91ViawkI2ws+3r+/QgRP+wGtgobumpPKe4eoZuedPsmlFNVMM=; 5:kDceR162WH5ciPz0xul5g+tdDpvc2fUcfG2NNaOPhNCautynnWC42ZCEadhO8bnPB4c5xO/ECwvQNVdn9+kjMh0hfHdiDxTvBUBDOpUwAxNEWT25ZtPAsPnFV99AhcqZe7ZRCZEmA4Auw/ScQM/1qA==; 24:j9vJ4s7wCzFEiYRehidGJvGQdNhJstVnPMSapyb2MzS3stU1EUHQBkJ4KeW7V+P4jNNSTZMeQkdNZHXaEANbl12eMnOglu4KnhmTk2ZrLPY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:EUNWzRv8m60xz12BjHtLK7M9tyzFNSJI8Teamd9lxxYyVnpjz4DmKjwdEFQ2SaYFAZUep6jYYiruelpA0/vVrl9lVUKGJGTn0A5ObfD3S5lQRnH8SBVtO93YIo6g5ieoxIc1LplEIdaZ+PpyJx2S7LEtL2bas0IlSK3InVPm5P2uEvpeYWOZRbQBa2skprOiG7RmgWKmTcZIURnDku3JBWtkESZ7bpDR8ZRzwwlzhwNoz/zVEgBBfWv85RbU/0UfuGMZeZUhDJ6vlcm27ZS9bXuKkwcMC/VicZevHyVZ1LCXAbrbFg8Ow9K0fbHCGzURzcQ3N9JNrQ4ENLdt82N+kM4ILAUeGEOozXYJKWVls2xju/EZ9cn7G6QYH9wht+voM2eJJy0P/gvspgA+vbt1Zdvs/e3ZcjqH8b1k/cJyr1mCGMdK+evj2kV/6lUNQ9CWpGuaAAZIMxdtMaFd4IULcg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2016 01:57:06.8968 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 00/28] 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: Wed, 14 Dec 2016 01:57:14 -0000 Based on the disussion 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 patchset split into three functional set: patchset 1-9: Introduce I/O device memory barrier eal abstraction and implement it for all the architectures. patchset 10-13: Introduce I/O device memory read/write operations eal abstraction and implement it for all the architectures using previoud I/O device memory barrier. patchset 14-28: Replace the raw readl/writel in the drivers with new rte_read[b/w/l/q], rte_write[b/w/l/q] 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 flase 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 (14): 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 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/bnx2x: use eal I/O device memory read/write API net/bnxt: 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 | 15 +- drivers/net/bnx2x/bnx2x.h | 32 +-- drivers/net/bnxt/bnxt_hwrm.c | 8 +- drivers/net/cxgbe/base/adapter.h | 13 +- drivers/net/cxgbe/cxgbe_compat.h | 3 +- drivers/net/e1000/base/e1000_osdep.h | 25 +- drivers/net/ena/base/ena_plat_dpdk.h | 5 +- drivers/net/enic/enic_compat.h | 17 +- drivers/net/fm10k/base/fm10k_osdep.h | 27 +- drivers/net/i40e/base/i40e_osdep.h | 14 +- drivers/net/ixgbe/base/ixgbe_osdep.h | 13 +- drivers/net/nfp/nfp_net_pmd.h | 9 +- drivers/net/qede/base/bcm_osal.h | 18 +- drivers/net/thunderx/base/nicvf_plat.h | 45 +-- drivers/net/virtio/virtio_pci.c | 14 +- drivers/net/vmxnet3/vmxnet3_ethdev.h | 14 +- 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 | 21 +- lib/librte_eal/common/include/arch/arm/rte_io.h | 51 ++++ lib/librte_eal/common/include/arch/arm/rte_io_64.h | 183 ++++++++++++ .../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 +++++++++++++++++++++ 31 files changed, 928 insertions(+), 126 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