From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id CEA99F92A for ; Thu, 12 Jan 2017 10:20:37 +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=akDfXS018sdLt2f1tsKv/YeEGSVUGP4xuPsIRS+tYXULPccHu8abdkEFYuQM+4qBpLuVPUCeIyOUOSNi7ZklDDATAqlI1Y4kIYR1IrkyOiYZrgKFuAp0wnnXig6hMp273FzRKwB75H5xgHBgyUjAi8yFp6Aj51mpYRCL2ebRxZU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.caveonetworks.com (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Thu, 12 Jan 2017 09:20:32 +0000 From: Jerin Jacob To: CC: , , , , , , Alejandro Lucero , Jerin Jacob Date: Thu, 12 Jan 2017 14:47:22 +0530 Message-ID: <1484212646-10338-26-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484212646-10338-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: BY2PR06CA0007.namprd06.prod.outlook.com (10.166.106.145) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 69a0b7d7-ec03-4473-d05d-08d43acc44a5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:WCq88ffva/Zp6+rccSGGTeBKmrPG95eSUWMIPAtvvDMV7wiypszU6FLtJUso7j2quUjm43iTk1Mra/ABGpMWXLuzHBCZ5/Xo8KCVnpgDKemLEayxG+7QCXskj/3HVXPgcVQ5GrYjSPKQ+qW7pkSwXnRGonG8BHFeFIZsohjOHeFZe2Z0HBLE9bNRvt4ouKGzZbcSe8MZFS6LyMO9siyQDKGvZMAQYEt7guXw6iWwxA/RpFqoqM1Egkgz/0nZFvTzl93OuRiRqKeEEzRiT79fog==; 25:HWuWO33Oqa5IDI7zgs0UC7A1s6amvb8QHV2uz0rOxEM5WIkAXvTjNhUW/k43mTam8KDhYXtSYnk4J5vwD4YMjlAZ4vMP37M3FStH2rj3xCRfQi7Fvq/aSiwZA9xqlp6XUI+B6GZC3c205BZKwbhd6GVTeYBUS8ECYrRuYXs/nvHhZ8SXNsFxE1lAfBvQc32GnFXp7BOM9KhRS1Z9dyTp0FirTuR8TOXdxm1vhIgNEotkB1HIfdFNAZXQdBKHwDbxgbMk11puv8kT07VsVjON4xE1ZkozSaMJDGCfM3rfk2mmWHlomGB61zSlsNhCeeogCKMi+F2V04pZS4vJta1r6vL1hVU6APkrPqu7KwVBzOZAEpeJczxEByxwdZyUQIq/pCwDZKjLNLvtbTOkr2HpJHBg9vBlLpRCTtKQGmF2ynNVYfN+7CMr1S+Uy68AmLvnaHUrrJhszb7xXXvNQCf7NA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:+wzdxfezv+QrLYSeOD4TkAPKcFhFnQv/V3nmLm1tafpWqvoBlN9MHvueQsA1hZ1g7UbxUo/w7WEdmeb/UUICwhVaUlQIFifZW8VmoQX+VW+ZKLOykjYTRRL5nNUbpaudnSpgJQEivUSoeMiwi6nlumM3fJC1cotKaeorTezsOSL0bBO6iscUfe7Q022lxQbHLdv/1Ght/oB8+ZIRtQNd/X42UmOOL3byzD7nhsaLbhkQP4LJOOUa2GCHQu3cPBHU; 20:eccRD54evoZossh7jEjB2cRpuwFY0NcowVJQBGqnoRM004imIkMowOQe+UUCYNrvw/YvEikUs7emrMoW2CoRRdSxY+E849fqFI8DrK8D9uIvO+A6wAE9qhumLOz/Lqk0o3YP4xcx0nlICFmV/Uy/6/UlFoU0ckYkkX6j9MwJ9lOBZhE+c8LXPIIPT2bO/AlvGzl2ZILovZcmvsb+ZIqD0Fj6ytlBSaXyR3dp0NLytxo42bxJ4UuB8JivfDx/U63W9LkRo7vxn0lA/8nCxjWIckaqQbb7kodoqdQ2N9d4CUnyzk7k6eQMVlZhmRp+98WJkfGfgB7cksUAkO59+RX8i2lE+vXuX6t3Hg2wsPajdLKVHPwlFb/9NrQ5fAR+h4++TKyd2vcaYv5WpTLGSznq2Ur4SHpctPlH2NvdOo512fr/zOwujAfesy3eMqi5w0PqOPm9KLMdFyex0aAycaeAri+we9W8ojMfsrF2ZBogPuZpxR08HLG/Ck59PIVqlGWDHf6rPrn2oeIMFQGJHdSfFKcQHr0Sap9c9mV9WiPaelRhEW4IVhkEQ7CpDuHKhsPoxqjqG0MAqOTiyAVD1cuJEGxweX/PQBdm4wsDH7uLdzg= 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)(20161123562025)(20161123560025)(20161123564025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:N/IyAR6KuRrYza5jaGsAmuM1I6VFXeKG/oI0nKRw5Bk9shcZ0n1bjJKCSOUfnh99OK31F1cGGpVxMieRjYTmEmGU8Wt8e2cXxlu9yFZ4h84hZb5yJzuUyga2Y6W+1rLH0omFaeLM3gP3l69ZkcQNnNV9ApMfeVBkhw4eqHX1gHy/QQZ1aSiNAIaWqEKkFbedxAB5xKlBM+ZOQWQXzFIdkE3HNUHS/kJXvAEK1/bjnZJ9t1Sa1jbvPTWnTlKhIJy2sX24zOm8IFwZtp+TMOyyoHeR/cTajKUg3L+GsBqIzKr1OQxDjCN0WSxZuIpu0Ckt+r8AgDio7OQ7i+tTdTnmNKCbqCEUae4hQCJ/u/Erf2qlNVS+LPWcJMYwNY1RyCEuD6vmhNXR2HH6iYjGeJ34DpH3guozGKKAHMzKkSqXCOu8VQ4usVepdYpTaXStQ+n3+AS4tD8P0iTvBuJlnCWnosVQEHcoP44Tgg6qP2WTjKeyKF9p/8PEVe+q9sYUXrutMEawneb0fUvyV9aeZTGz2wU7gyocHwlsV+b/MDg58CvEi0sHENy95oEE3OKeM0WZsdQjCBZggaqgYMJ8h60ryMX/kCcOBARTW++VjmwE4os= X-Forefront-PRVS: 018577E36E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(189002)(199003)(2950100002)(53416004)(76506005)(92566002)(105586002)(69596002)(2351001)(42186005)(68736007)(106356001)(42882006)(6916009)(305945005)(2906002)(7736002)(50466002)(48376002)(36756003)(5660300001)(110136003)(4326007)(39060400001)(97736004)(107886002)(189998001)(50226002)(6666003)(6506006)(38730400001)(101416001)(54906002)(33646002)(5009440100003)(4001430100002)(6486002)(66066001)(5003940100001)(6116002)(3846002)(47776003)(25786008)(81166006)(6512007)(81156014)(76176999)(50986999)(8676002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.caveonetworks.com; 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-Ex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gneQaK5C90=; 5:uHvmVXgh0ejRLvlMKnVNzKTmYOnGKRkqw+q9xQ8J12aCoxeKYwuP9AwlyWVNNLlEZL44gzSiikjxa01qYCtm6xWod6sYBcRyP5naN6EGX9tho5lNYpFYgQxwCDsgARJnio+E4mYHOzbMM6n5ae7fRg==; 24:ql3lIeNGI5uGg/lUZKRICxk/rYNK0j4o87+mf7NrdZ3tBCWErBJAqU50JTnZFxyHsHfOs4fTlUWBKHLygnX5Mh24LFAgCym4Funwf0UaIoQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:Kr5sd+m/C6ZHc/EY99ITN17JaJf89l6g85Vh05LuepsEuJbquSfqBs+pQVhOg+levkQNCFLDFKKhFfm6M1+kfb8+tM/KouceEi+Yque2UcPSJAmVM/ovvQdMqxr4P09bPWyIZovyL+YOGAq1mcC7k4hBRq+Vp716cCzasD9jRtAa9xS1OGRZBf4N9lkP9mYOm+a5yRNjn/1VTVlk4FeknFy7D9Rp8a1pQFiunEpKIJLAKie+weaSgN7Oh/NMN6qXMYzxdQsoEM7aRXn9yDdxNgGYeKv6NUuizBHYxpISmnzECBWkVlUQxXQIE7CAdpOErMn1OY9/8NklhO53S29N5CgA5fP+9t1mHmIawVV53atygQ0oy8y78Hp7MEvqQto/CcLckUfiZ4swgULi+QILcgLNOpYc0MnzrL+mgkji/Lmraz2Mh1PDk4RGFIVhAMNNg+pWhH1G1ocRwb+V9+cUXw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2017 09:20:32.7522 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH v3 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: Thu, 12 Jan 2017 09:20:38 -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