From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0078.outbound.protection.outlook.com [104.47.42.78]) by dpdk.org (Postfix) with ESMTP id 924E72C29 for ; Tue, 17 Jan 2017 08:16:31 +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=zM9NPVenmFF42HUNEjjIo0zbWl7IapdYSjcnSf2Q0uU=; b=RetuL3Rza/J/xvywiuav6JWoc19iFBzYaCx14pFbqaW7JQF37kI+kwVg4xh7K6z5KqxY30BBR/utbmCN0A2h9/4ewxrSP0bnuSqS5ywsvO9rpu6I0fRlQ8J1B3AQhMJWo9XZzFCOchf1/HvH1HcPD4GW+XiHIHNiym1TsBddGyM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.caveonetworks.com (111.93.218.67) by BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 07:16:26 +0000 From: Jerin Jacob To: CC: , , , , , , Alejandro Lucero , Jerin Jacob Date: Tue, 17 Jan 2017 12:44:00 +0530 Message-ID: <1484637244-7548-26-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484637244-7548-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484637244-7548-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: PN1PR01CA0030.INDPRD01.PROD.OUTLOOK.COM (10.164.137.37) To BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) X-MS-Office365-Filtering-Correlation-Id: 8f755665-8f91-48c0-e8ac-08d43ea8c1e3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1724; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 3:zc2jkJ8o8enTkbnJV8NZRPWP0FM7i3w+P5qeo3hSNckhT4efWbM1bAZTl6SvbDPoxCGE6tvF5vj6GG1nTdjPCdeCoi6s1SSNS7sphPtWR0riNTjBxoXV+P+e7N2iELeCgmSPaiVHOpl7ECtsomKWdgARqiwC9yJ88Ef0+fkoUvEA/hEM3OGiKRmBGgOfpK4iU2dy1y/R0VN3Klm9FgMGfM4eYUB5DMjkh+Ru9utQtU8EqTnQDc1YrxKDj7WBDG1ABOPgWrlC2J51OGz3Alolzg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 25:4uyr0R3C9NtlTB+2nPsK7IomMVRnrdlfvwZgDyS8xf2Pf1hzEARvA6Vk1VjrjzWM8P8A8c4gWssC+Y7mZmfkuFA+giLKm0UnrR+511TTc74IpzARLvywDVOQin/9frsM9JrX6YXMKKfg/1TYdgIdIbrfPskwkh7Efm8u4J2A9Yb+T/L0iGOdaCMLrkZhaMkSUVCJ04qWIhs0lJIxSHwQZRLUN4IoLtFhXKyPCxAQI3JoWMEF5fop1e/XLMToaHbfPuOTReWHYIbs+lARaLJKyOxpVTuhuoVVdkZcX4XpMUaU27uMfNZsSSpOgKfRxhyVyKPTB7L9pOwQ6aMiIijGmFycivO0TN3seNRqCu+QfthvTGY4Xg+M91RlhkZanL1tEWkjVH5H6CH2icyRhJEE6nZFeXI2hUojqfuVLuD6lQKoyVb+H6DI3bRdkmls6sAIpwfOIXcbZumRzL+3+0N+JNtB1+0s6ewx0C+cSyuX4p5B8hzuDMRGXVvPnqRkAt7/jbxPAPxhERjDZJ/MILQJ3EkvxNdMAoyRw8VZCeG97i4T/0Xioa29vSq4qh96JaD5B6aZr0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8bUNpvvridOSNHs/QEfxR62Lx1fXAX7QxFH+hB5u3ftw0uQ8UXcO7glt4Ny78pI= 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)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BY1PR0701MB1724; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1724; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 4:g4umZsDCfdhmJ1Umkm2SITyivt+AgRxY1eKHr+rc6gSSSMay6GSJGeC4i+fOv5NxXdz5+/Xuv5vfgr48hWlBSajBJJxiRJYlQGeEWClhtrkvLzuSWecEay0kgsr6HYudgHWCggZ7qhDPyaRsIHYuzoHCyk6HEIwOHX6p6+nLk06GoSMRsSEtiF8WHEa5QQCIAyIIvQnRWtblSmr4eAqV0PusPn65LnHTad059yK3X30F5rwDglvR/dMhJu32dUJXYy3zM1vutLjAxRZtCTS+28gpFxopbOiH7x+WlBNY0Q4O5JfHgUGeRIcS0Z+T/NHvkJgefD0or68j5iPy6gB/pvgAO2oqHvDNEop8ojK+rmp8iDxgl7AShLDRC5FpbPsqjoKr1WZqsrfysBssSAradT6xs2mcw6Pp5eILNFx8b64aVK4xOMvD+kXAG3J3zfMowdAfn/cCZCFtvDUfW7+f74MsYGakXh+FMRABoBAFXzVPfcPxC+E4PxpDFmkZj1yFL6Np71r99CjLQOyqwTXWtp0RQJoBtve89zmvJA6hBDA0V4HR81YARnhnZMfITt5HiD5g1mamBDjT+8EkB6B8uAQ2Ga1cLYI1inJQ/QXIUoc= X-Forefront-PRVS: 01901B3451 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(199003)(189002)(2906002)(4326007)(76506005)(107886002)(53416004)(189998001)(92566002)(106356001)(38730400001)(47776003)(25786008)(6486002)(54906002)(66066001)(6506006)(305945005)(39060400001)(7736002)(6512007)(5009440100003)(81156014)(3846002)(50226002)(5003940100001)(68736007)(4001430100002)(6116002)(76176999)(50986999)(2351001)(97736004)(81166006)(5660300001)(8676002)(105586002)(69596002)(42186005)(48376002)(6666003)(36756003)(33646002)(101416001)(2950100002)(6916009)(110136003)(50466002)(42882006)(30001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1724; H:localhost.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-ascii?Q?1; BY1PR0701MB1724; 23:Lsj867EhgYqUDK3Bx2CgljeBvq0UAx2X8dCi140?= =?us-ascii?Q?Ua+3DQQhEcLCHDsZ9AmDGop3l0oUvB9Si96J0ltRYlimnPMcO643o3tjURBH?= =?us-ascii?Q?trhi67M8zMeK9Bn3HAm6zgPezzOThb72NAwhZ1RbA9Tczr/klcWv/edgUSkr?= =?us-ascii?Q?Vwf6kvNoIwzQUvgsjrqs+LjGAajpypBbV4eTPJKG4ucVSuU2MFNhuu0Gg7iZ?= =?us-ascii?Q?QYuyfdGd0oQ1A5D8/sL+AYt7/Df7PBDHa/4QxK50lR9abIzn0TdqtmFW0nYD?= =?us-ascii?Q?pJugwgY1vGgMJF/6yYBxtvaVJWI7/KJdVIv5S5A39aRF9bUpkqmbyqoIe+x+?= =?us-ascii?Q?Eh/i4Z/p/x2YWOh4b+gbpos9cpTgMI9msEw8etnkmGR2U+2BMSczb4nXYl82?= =?us-ascii?Q?6mw3fYoA7mXoFpyoOfsSeX07Z03YWahL08gia1acNjSMqWCUnVlVaEIDzOxF?= =?us-ascii?Q?Lo+Fxf4h/nNW8MQxOzACYbNJRRRWMg1942YumdK12V/WFj2ht7i4aRZyyrnW?= =?us-ascii?Q?Xue8gch4mfhBu1+u3l0+7ouIgrw36fkW31FMYT/BHg/yrVugMQMVj8PRa+PB?= =?us-ascii?Q?JgwuUbnJN2DtQvKBES8g43PfPjhHYrXlCDcYFzyRv0hDoH/dCJgqqP2whueN?= =?us-ascii?Q?EoKCSeVtAhA0SIs3aB6XCL1BzVx9bgo/awi80ApsBczxr02YnyYKmal2eiKv?= =?us-ascii?Q?hE/ImH8XPPujTIzjtN6usDlKMAQ7KP//BzX5ZUyTFKQsXD9Wv7Z886Z8lVAz?= =?us-ascii?Q?lWV+beya+AxdrM7tsYuoe8szgTQwXRiR65g+S3DpEFIz8ivfShDF+polm2TS?= =?us-ascii?Q?4ANgriTzkMZXjCpcz1kZzZaLd4dSTjZztgNye4iUAIFArn/tc3GLSqNt9JlS?= =?us-ascii?Q?8kX/NhLwMnPmbsCJu2DcEv0F6/782xha9A4coOiDdseboufI/fHPV+qx9EM3?= =?us-ascii?Q?xbrTLKUW6FvHjU4q+Zqs+k8niQLQEIhnc0dULB4AblJjtr7KfkSm7nhShoO7?= =?us-ascii?Q?C9IHZtiuvq7hXeIqCTU6GdB1sJfMtcp2NDSVy7vqhcREaMz/RvHHqixQrkzs?= =?us-ascii?Q?WM+wjga2W6fPdlVVbKPnzuvWl94AC93aPCvip/bBa/MgNy610wPQg5EHvR+5?= =?us-ascii?Q?XUdVuZ4nkr1AdJQGfPJ0AQkXbOeZKFY8S63VdnlT3kfRZQC/DNQCdrL/cWUL?= =?us-ascii?Q?nGcvf4CFmDfJO6i+MbVBT4NFyyrZS613Fyd4QITiXYwHBOtXPu5LgL/Ui97O?= =?us-ascii?Q?y6IrbCOIvOxWGj64f8JUCk9wgbUfugY953CJBICQcQvTX9fEfVTRP12Xg2T4?= =?us-ascii?Q?cy8GcVOLDaTrlD+MW6JE2eGdmLdCunzTB3ckxYuQiB2e5?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 6:uqFuQtA/u3KqmS1DW9lYCN4AYac+t3Yj0Bb045vPaky1kuhrje1fTbwwsJUjWIRTbWvBl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VCx9OaxyU9nEHJzaWnelaTQt5AqNyuxE5uXMJDd+j2JTkfakUXAv//bf2fl7EUivGrhg/h33yrr66o90r+pDqtoaw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 07:16:26.1742 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1724 Subject: [dpdk-dev] [PATCH v4 25/29] net/nfp: 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: Tue, 17 Jan 2017 07:16:32 -0000 From: Santosh Shukla 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. CC: Alejandro Lucero Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob Acked-by: Alejandro Lucero --- drivers/net/nfp/nfp_net_pmd.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h index c180972..f11b32e 100644 --- a/drivers/net/nfp/nfp_net_pmd.h +++ b/drivers/net/nfp/nfp_net_pmd.h @@ -121,25 +121,26 @@ struct nfp_net_adapter; #define NFD_CFG_MINOR_VERSION_of(x) (((x) >> 0) & 0xff) #include +#include static inline uint8_t nn_readb(volatile const void *addr) { - return *((volatile const uint8_t *)(addr)); + return rte_read8(addr); } static inline void nn_writeb(uint8_t val, volatile void *addr) { - *((volatile uint8_t *)(addr)) = val; + rte_write8(val, addr); } static inline uint32_t nn_readl(volatile const void *addr) { - return *((volatile const uint32_t *)(addr)); + return rte_read32(addr); } static inline void nn_writel(uint32_t val, volatile void *addr) { - *((volatile uint32_t *)(addr)) = val; + rte_write32(val, addr); } static inline uint64_t nn_readq(volatile void *addr) -- 2.5.5