From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0054.outbound.protection.outlook.com [104.47.33.54]) by dpdk.org (Postfix) with ESMTP id 61B9EF96C for ; Tue, 27 Dec 2016 10:52: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=Q5C7Iz7+MH065h+vMtABM3tubmZLdFN3qXua4Sey3So=; b=SM8m7wF7XZi9hF0Is4scrHY15gRMBG/m7a7agJgAmX2EzYK76RgGpNGk65kTav5GQ5unk8v2AW45Hbp2f+v8IKWw/+QprdnUu0Ll8SzvTZQ81X7WlWNpdLY7oLUddiQ1q1LbhLWkTaWHwYxRdOQomLmEgO/ID1B19vNjY4JDoBM= 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:52:32 +0000 From: Jerin Jacob To: CC: , , , , , , Alejandro Lucero , Jerin Jacob Date: Tue, 27 Dec 2016 15:19:31 +0530 Message-ID: <1482832175-27199-26-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-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: 17327695-23cf-4f2a-7234-08d42e3e15de X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1713; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 3:KXj/recOv7tqCBKFHCpjaaoqbq9As4bUi4VC9V4/yBXk3kb9XIsy4hFI5MR+MU7uTN+DXv5B24dgMlh56vccS71F4komdSeNGZ/usZ1EqIP96erK29TACjbPM+XaWkcYtbzowBVGc6QWQNCGZ3P3zayYxPQfmAtpP3cYVr8IMTrDa5xmDAJfA8RE+duVbS2ZZyNzBEd1H/qL4f0c13V7TN8RRSJtO8JW6eBeStq+jqjSJGcz5Y+/EI13EfqvxDOKThMqGdwHVedQLPE0eQnMvw==; 25:uXdnX+f6kv6EWcgBM7JemfkkzuPvWaK7gqgRH3S+QzWBgGu/Vmf3rSLBM8StRPfW4Y7uzj/DWlhKuv7s0ntVQv/lcUUCOsxF49UEtaDTchwu4KvSezx3aOSRL+Bi1fysxTy3v/kB1Eei35UiX0SzsIV4gdoQeXZ9ToLEx9BJGfH8scz3OvO7dexBjG3i+ckZuTh69RgBFoUYe1WYDqRwaVcZR71WDek6s8MlQdRGNeIUmIKsFLpbEK9SSDYcMiHNrIdz2CoX/zZ9TwewABvI39tps8guJS1FJJn8UUiGYB6WQow8BzWncDJ45Qp1+muEehfXrPdqMQZ7p0nocVOiS1Szo4cVlcEC5qCr79DuY50pJexcRlq3ZVGRlNj4LoRuI+kPnpta3L6m97sw6wIzbye4ZkOiLM1Hu/OFGoI9QIH/n3VR+aKVuOl0CmIsN2l9CRC4VYTCZiNfuXK8PBcqvg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 31:Yp5ZaF+9Djc5wxAVM5orvwyn+7jNIQjQbD/VAszyjXrsgSymlVjCHfRv/rG30YlYEVq0gbPN8QaIFJ+4q7REjHJ4lbozsZhI6w2PrtfPl4Ks9s4op3+389tbz2rgvZUKeY4cKczEQWBVuHccA50Tdms55oSbapUCdxFKehDgJtPfDKqUq8cbumELPjMn29yktWORhGMApdbofC6ZJvD7Wm/8mZpRefAnOM5D2NmEmF9X18FwRSmZwKgFN4IktJZs; 20:7WkaCUPb9RKCbr9AGkAu/F7vMELVl0uW0ud/Z8fWkaAkDb0UYHHQUZrpvH+rU/MbmMZIXnfHF2gqj0avO8Vk2tSOiEn/CtA7kedItChZ2ydUzZbhTCRE4nOlstzXvDnGzpPDMBxpNhyK9gwQN94pyXFTQSHD0Da1krAXHpv0pvJvi26zvbAC7eCMBmyYmuCHXe2cjm5dBaOHWdjfywHXd4gVXSutyV9BjhiEZFrB+7DrL8y33syMRyvay+WWm2GHTB8uM86/PUPZbZ1hrWAvnkTMr5Ps4gJtDJFfl41ZKeSDbv7aX60ySco9y8WzzhK8TjCkFJ30JDOFQisQAdiqV+SBALh/igFbJT0FNWy2NITHI198toHriXtDRiUayrM+AmUOgZZqmM+pGr1Rl4HMPIkauSgh+gmcK14dWKiA9iZKCpjO1iMu1QbpWOpyCIWMDOLbiBOnNLgP0dOsr1gUW3Mfr9KjbbkLzyh8+mw7sq6Ahz0IyCbL9/VWma9XByK4AbDTxR3ry8SWY17jHDLarHa+sylxC+TSHYoPgaqix7XQ0zgi42fbin/siLVMUBC9a683KfW8DxuhIUW7JPr09jt4TJp2bYilEKjeXubZIXo= 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:gDuuAiSTHEiHnPHz78ChelU6wv6U9hmE4140NODC6cBhX7Cn/Flm9Lv6OVtgBoovjS5A7neJBTMEC2W+DrG8R2dRH5FfqgBc20cWKc5HJqvOwuWB8MuBAhkFGbBrf5cWQZcz83/QU0+cYzIQQTrgNRZAvFZsKMSpitm65JcgHDZvSvFmZoX6fABVbTMYlAKhJlX2FNopnzsSfBNWlCL51/oHaE1nh8zvu14kbF8Vk+9R8g7tecPrD3dwnbisM/Gn6+1n1bnEuS9qzXHWxMs4htyJjhNC66rOYTQ0gBt1yUXA6rNzHe1bMU7wm1PbudtKiy3JPvhKUlsifrYZwzc3PYESJhsRy9O1y57QuZjm0jyH56w2JVC9gld/Zw9PIjbN/UgbvoBArK6wbe61G14iFBqPpxHCReSf6e5QI4aY275QUyitzmHIiSgYxw/GltFhb997sUTSXrz/MC0qOdG79wpDjwJICu6C2rWZrhQUsiYXVFF2zl/rV4XaqgEXTtaYvmxhaPzgjeZYcQ2/h8lHIarJYhMzMme1n2EKHj8fKQ7Lv5uXACii5i5xRJQMT575V1LFcY+x0MzJwSXYFk2+8fn8B0/GxBm2nz5WJ88717KDEN+RCebHhAjGpFRWguDvFGGhJpn1Q6Ewg+e/3FAW5A== X-Forefront-PRVS: 0169092318 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(6069001)(7916002)(39450400003)(189002)(199003)(36756003)(68736007)(106356001)(97736004)(50226002)(5660300001)(6916009)(47776003)(42882006)(2950100002)(189998001)(25786008)(105586002)(33646002)(107886002)(48376002)(39060400001)(38730400001)(7736002)(92566002)(6486002)(6506006)(6512006)(110136003)(50466002)(305945005)(2351001)(50986999)(76176999)(4001430100002)(3846002)(4326007)(6116002)(5003940100001)(42186005)(81156014)(81166006)(101416001)(8676002)(2906002)(66066001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1713; 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; BLUPR0701MB1713; 23:tZbNFOc8enwu0w2ycbFkGTYDBS5Zdu6Uj2t7UMh?= =?us-ascii?Q?GR3rPrc9HHIVFwsrvshtkviiI0E8nB1guaEDQSWZfKKK1skWrgeCmNsoxcPd?= =?us-ascii?Q?emGXO9I3SYjeapM++BEBI2MMclj/Y2/UtLdR9STn004WmY2vI92EKFSuNfKS?= =?us-ascii?Q?Ry82Fsv+3WZu/Imp6M3Z0vEi5AEmsr+dFgQDD+LYPqdqQFjnjkpditeV2wBM?= =?us-ascii?Q?yKLBP5u2hVicZKSea7ieel6drK+TEN1A4U8dQZF1POnV06qncqYdkzUyR87x?= =?us-ascii?Q?FmXMXnI5CFGp3AadGMJ+6bFYCekcRCHw7WcZ7EglOWJSjVk77EJTcsEN/pq7?= =?us-ascii?Q?488/StL3KzzzIiW7468UdBeECe5hTvRERnJZLVeCq/5kwoAdfzhhhm1p+23R?= =?us-ascii?Q?nPmTnOkeEnYJgBCR4dPYUBrxkg6nxzH82ylYQfbDCbuD7fvQZ3I8sa+kzhtI?= =?us-ascii?Q?26FI3hnuFI5RkuufdkKvY0xoCpuUGVA3WI3gbeou1rCnEUykPHqfzTdcPABk?= =?us-ascii?Q?ae6VWRL5EvOQRv8mD+/e5pPxA0dpMvs1AvUWI4OIhfwl6qIAcuqjEMU6bsn3?= =?us-ascii?Q?p7+Wxlq+iOWX+sxW0ouO7Iul9ZRJW3/wrwGrQhnn42LqBfQxS6vT7PcMCU6B?= =?us-ascii?Q?VDBg5BOPahtTMcFk6v0fJUjItTWBkvFNrp7yFCATANmTmq2Fuew1Q9QqpTwN?= =?us-ascii?Q?t3gXkhkwZcaUqdp56R4Tg5k+uys6eRg2DRcScKpOvKi8XK3L2I6eLPJF3xRT?= =?us-ascii?Q?SWXyyeKcIL5+NXGp2rmdl7mufNUFSfF6FhNYu10LsHdR/MYc0kRcJK9e1tp1?= =?us-ascii?Q?hmhaDH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ZSDrOk89yHKxxbRr/W7pp+Rm+wxdNTRW+m8vzuTqJV4TlBDTQhRQcHWYhQRe2tmxxlwh2BwpOSBeeFnj8VzV8YGyPvi4HXxHGBkA==; 24:hbAsoenrWbVKbPR6a2fEY5EScqpTSJ/sCACxQgcmpWpCEEbAEyBKlecSuMj5J77lNWZizRWSiMRb1PDdJWhmGPGqBa6ciFhRg5CNW/AP49w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1713; 7:/q7dERdRTiErTbRF1O+ZHwVrF7o493XFLKU+13T49tuvQEleViReONn0Jh52uCF9gb5eADqEqEIzCgZvJJJ3JRjfgjQmh6yMPAwUjR387VzAPjdh/AjyHRM7drGyXKKAvfpARIqJCURft/ZLo1299y71/q374P6Xc/qcmZuyafLpB4njnLOCK2H30qSZoIWlU6BomU96HnCXm+p0tRpjm9jp3jYq/hvQwoyJV56BtUWiR0gkqu8H3nZSimaU7XLFZZxKPCUEEf4n+sJRqx9Qk32V+VogHe6zThcH8RD/ge+fZz6OfJr4Ed08ZdRvLtzbU/Xa2j+gVlL2hxTnQuyKjNLtwsyuziHuTKZj6juNp/nMdLweudilbXhBlQo8Ho19X2q65V/EpeUo9j7ekjhs/tg/Mb3c2GrDR90GTemgqnnKgwmYfvk+n8ZV+Tocv2J/OsZ3mj8WNtnQyG6qdV8lVw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2016 09:52:32.6415 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1713 Subject: [dpdk-dev] [PATCH v2 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, 27 Dec 2016 09:52:36 -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 --- 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