From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0066.outbound.protection.outlook.com [104.47.42.66]) by dpdk.org (Postfix) with ESMTP id 2D41737AF for ; Wed, 18 Jan 2017 02:23:36 +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=Uu9zpKg/C74Do+LMj5Y0klLQZjhOz4tmMmUskkxVVMQ=; b=EhZVPnQfdQEpuOmWwgNSYeUKzBa613eRxI6gXTAT+uYpDiN/5VZm9mrShRMWl1Bjmr70ozGMvrrBbIuZxZcQo07LpmCGS/74H4inQs4C35gQ0wKtSMcpW+2ba/GG5YayBUF5V3NaY2cAhdRnOAfOEP0tCRpJs7NfXhvVgafguOI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from jerin.caveonetworks.com (111.93.218.67) by BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Wed, 18 Jan 2017 01:23:31 +0000 From: Jerin Jacob To: CC: , , , , , , Jerin Jacob Date: Wed, 18 Jan 2017 06:51:34 +0530 Message-ID: <1484702502-25451-22-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1484702502-25451-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1484637244-7548-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484702502-25451-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (10.174.56.159) To BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) X-MS-Office365-Filtering-Correlation-Id: 8c00c29c-7a8f-48ba-e50e-08d43f409ee3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 3:7cQLar9ucjyUTcIpYe74ZSIRH4zYBSH4DKDvh6dsD8Nx0mRwKcwm/ntdwfRBmfMiLvbd/9E+DtBrkO2yoPg+OWTNGDoLLtjeNYqPoW3MJKcbK10CCAjPCEEtfNitlqx52BWCNaOVjT4/3YxQdTNNYIlZGaz9/UAnJh6r2soNxYID+DDxg251HN2+wd9PGfukZuwPv9xhRsYc6U5EeSIBDa0AWPbvdszMJB/PmYZzdaEFsVcc5+NNykY80m7wERIU9nC0R6S8PMOhKJmcWIQOeA==; 25:Kn7MkjJ2Wlm5nqmAgpt33hRHs+45eZzPt5x2LJbbVBMubfUzJ7JkdQvE0oHPsrGoeDsjdAxu6WZfFA9K95cbQdV3KQiWaG9VDDteLviyKQnAEP+WWOXDA8MXmRoBVEnZBSnm9vXu9F4Zq6rSGNPfPvx9Ms3xEgLaEx0IJb0cxuzL92FCDAkq4FsgMVO2GN///Nu3P3DsDci5A5jmmDBntZhJt1QBiZLZAY5rjr7G5IwD3FgVWkPVG1+1Mqxet8W4U17XcwpWyYbO5HpsMPV7l2yZHne/9RZnPw0YE5P8ETq3Vx+wTWRLVArBrmRoZZH36J2P6KCU9R0agYRGlzeGcbM0Qz9z47ZvVO3kW47TtXViWBDSHLTVZV5C0VxhorUszZJ8cs1gkCR/V5L4hPdGqh1DpG0QvRqzC7QaUfOpQzw2bNwsDR2DcUnok4XFppERr85djQ330TeO2oPIphbrIg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 31:9S8IOspyDrbXKaItfBYlW2Mfu/kuPqjcx9md9+FqSC0zt2pQGtw25JlFLj+vikRXDGa2FEJ0YW6dF6Tn6GQHeD8bpYic+R5MZZujvv4mGKOZZsIdu8d6IBlCNizehq8mD5ga2w9gAMPF3xne3dEAsMQE+hByieTWsXUOLo94z1Lpcd6UjtQ2zIymQHdq8U3QXsv5CjAtasxSTNR/O5YU2eFYMlUYwOx10zjyiDI9yG5SCFA4tEflen5BpGvuDyWP; 20:yVv+C1hxir/eGtN8SlBbymoBQlh812WijfmjCdsiKhc/RfeIRd6h9DwL2q4kVwR1/4VEcdhJdOETck0+ZXrfgrReuvVa2oMF6mmdzdJOmOGvLS1oHIbiS4oRyINJG8Sh3DRXR7eTTpvlPVrDqQjPZ/KMzVOopouAyeUhx4FoL+Op22QIpizQ7rLJjunhJ+sHCVIfTuWUHKx0fyfalSlibDo0Wf+VeRVbhFyrbBQ6HpoqOCH5l96d8ewlggDWww0SjnK761jsaoFaSddeeZRYIGLzrffTWLLXo7sNZcMHY7MXlDyR8oNcK6RFabqS89Yf4nbcYDRnqCrytzSna+wVUqMuliv6nxY51bkjuP7w/89OdmhQ3mulTEZEz4+fMkvga2mwx2o4W9Ke5PQGgxakp03WzL+1Tg4T7IXz8+ndAoFOAX97w6VsILYE/Jdj1y7sZKKUzg2CDJlbgjW2J+bQfu/YA+Yd2z5g4MYEuI+HWUNt3X0JIyPIsBD1ex3SeWuiBYuZb0uqM4OEUQ0tQUh5t7JPqIkA3bwGU0FYjoOvAzONLyOFMhJh4zDZXgZ1/rcMG0PKHAJG1KlN5LwQcR+8lttdgTkA2WuzFmKHMVDdoc4= 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)(3002001)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(6072148); SRVR:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:novxq8U2MBOZE3sjBLlZGjLmQWQ54GDSrNorRB5oViE90RpHs+tGuE45D7tpsWqYlMEcfbTc5PLMttwtqWRQlyL73LM+lGmlDPGf7i95SNFk1MnvWDAwYqag9fzZq67TTynni02YwPfo9b4BDq3NGtbMJ47v64ywMv9x2Sx9Uwc2uzRgx104UV0QawlkcCWSDvDdXMNRCkzpBeMrLwxymCJVCEkiIWMRR6l6XHvXTCjzAMh2eOHYD8aK4ccmQMC6nSbpk76Maae0aDyN2p/VpfVjcbqcZ79PgV4IHzf4A18BLNSe3Hq1syqWrmUWHHr/6ZSHisUgKS73gPPHa3WGGZI7BVhzlQw5cKb/Q3E66FtgPtxaDmdI/1Zedr/Gj3McNS+MamJfxYUVvqA6SMgLTN4EwiQ9b00jWDXDFl7KrC2ydwoLcQgLBk+lwDq2Pj5CdJr8U5uRlTCF1GPfebbBlMFHD8SRpMB6wzDtIURoNZmkGEWrpCtzjjxZAWPcGy5DWPIKzZCWUtimIPqFPqHRhD5BdTfwCogDidafhi9HFgOKFeOpJoU6Q1zSxgY+R4PQwGWPSERNCgp1jWTyqhobLnDMxyhB68tK1xlWdm2tK2E= X-Forefront-PRVS: 01917B1794 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(4326007)(6506006)(50986999)(97736004)(47776003)(107886002)(25786008)(189998001)(54906002)(66066001)(92566002)(101416001)(38730400001)(81156014)(81166006)(6486002)(2906002)(42186005)(53936002)(50226002)(8676002)(2351001)(68736007)(305945005)(53416004)(3846002)(50466002)(105586002)(33646002)(6116002)(4001430100002)(5660300001)(6512007)(48376002)(69596002)(76176999)(42882006)(5003940100001)(5009440100003)(36756003)(7736002)(110136003)(6916009)(106356001)(2950100002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1721; H:jerin.caveonetworks.com; 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-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vubgORMhC3/wLAnBlJum7dXpWxbBWtSclD9VpmiwF90zeBVsbndNaqebx4sIJqDHTH39h8KLJMxbyUSRk3PpFCQ=; 24:RFe0d7cVLoinhXWxLri6pLddj2dkhktZz2hx+ItwYWrXC0KdS3lOtgLHcm2uZEQ7p1kim7/a0JN2ycpZ9Nu/o/uqIxQ4nhHIsgWb3puwA8M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 7:filsg95L3rZRyvvgALKVuTrwVQZf+o/Hz0SrKJIRt6gMRoxweIbiVMnMc694d73X+GRthNb/73UjOY0+M5gh7jTL8ldHpnwdYAS8IMqA1h3OFpQ7LcxqJJceK8mBdgpKdEp9DBlpaEgbpAYLRdxWlXyZ3iESdffAEEafjhKUojFhhCNlkth2OMhPdGCLchR24k3adX/YXk/P418m65MlYtGebrEfpX09bRushNabTNAwlwJQ0S3Uo6xwNtLgmZ4VBlGcLc+95fMzs8TfQE4eu92Z7pzqkKk6CSp2Ns3o/+PUBIXV3Erq7c7kE00R7teg6rQyfsxAID7zD3pD2UtkbsO3Cut1KQGPv1q4tvRtQA+5Fmu3p2gv2hfeazVOfsZW1oaQgdoIVQk1+kV4cqgVc8ma0rekuTv4srOamxCkt9YXb4kOxQiWRg4/JaVqvRliKV4YEL9Vtpa2s1HUKsg6yg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2017 01:23:31.4872 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: [dpdk-dev] [PATCH v5 21/29] net/ena: use eal I/O device memory read/write API 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, 18 Jan 2017 01:23:36 -0000 Replace the raw I/O device memory read/write access with eal abstraction for I/O device memory read/write access to fix portability issues across different architectures. Suggested-by: Jan Medala Signed-off-by: Jerin Jacob Acked-by: Jan Medala --- drivers/net/ena/base/ena_plat_dpdk.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index 87c3bf1..7eaebf4 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -224,18 +225,8 @@ typedef uint64_t dma_addr_t; #define ENA_MEM_ALLOC(dmadev, size) rte_zmalloc(NULL, size, 1) #define ENA_MEM_FREE(dmadev, ptr) ({ENA_TOUCH(dmadev); rte_free(ptr); }) -static inline void writel(u32 value, volatile void *addr) -{ - *(volatile u32 *)addr = value; -} - -static inline u32 readl(const volatile void *addr) -{ - return *(const volatile u32 *)addr; -} - -#define ENA_REG_WRITE32(value, reg) writel((value), (reg)) -#define ENA_REG_READ32(reg) readl((reg)) +#define ENA_REG_WRITE32(value, reg) rte_write32_relaxed((value), (reg)) +#define ENA_REG_READ32(reg) rte_read32_relaxed((reg)) #define ATOMIC32_INC(i32_ptr) rte_atomic32_inc(i32_ptr) #define ATOMIC32_DEC(i32_ptr) rte_atomic32_dec(i32_ptr) -- 2.5.5