From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0075.outbound.protection.outlook.com [104.47.41.75]) by dpdk.org (Postfix) with ESMTP id 37653FA4D for ; Wed, 14 Dec 2016 02:59:29 +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=wnEpYQui58KJp4bVRUmeiaHIs34E3rbSJKTwlYkDA9A=; b=IyCKX+PKGABG7wAygBJi57WTJlcc4MUCMozo5D62hhnPEKsqsf5Qo3RiFSk1zlrNbB5TWGgIPIRvfK3jJkUT/HD7k7VnFclQqUucSySTuY8wvHHS5MY6/a8pDLx1lp+wWbpel5D9C4m2gDVSGM3IqmyOaRep58Bgx4hRC+24YLY= 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:59:24 +0000 From: Jerin Jacob To: CC: , , , , , Santosh Shukla , Jerin Jacob , Yong Wang Date: Wed, 14 Dec 2016 07:25:57 +0530 Message-ID: <1481680558-4003-28-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> 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: ce17046b-6393-4003-c400-08d423c4d638 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:tG+CJfdEcH+GN+e9EFDz1dzPTngbUeR1j56fPAxrZprTIHORjU6BlvljoCHx8auMGxhE6YHqERD1AVxk6052YSkQrcM+V5j7oYhkuPwZjqY2OIV5GDMisJhVsNYXtWnkgsQA/xc928bh7kqP05Be9aoyLBWCVwTrZnjUA7ruYCkrd3b1glQH+Z+Wu1G82FNOagjzDO+ohahHJ0TMiu7SMCRfW+bDnVvJOsOk5DMqTtrDdwUpvkgyH8QWwlPcrHWDXBG+y46lMzyP1IQfpvRueA==; 25:ES8fwtWcaHR0x5xL4yarOrzQgREzuJbpgzTLCg0ypx+NsZQ+2IKlrUUvev/pcgxo1tGg1Cp54q3xWlt5xoxgs/Bp5P3BsRXoI10lPMu/Rr/aEn76E542gSCyY90D3IQ9ica8HLExO/UO3EJNPy2Yhj4b+X8c1aHvkHFERl3rprn4gbI7rmp+lGYbR6Yvyx3QVJYGNA/sdT6bU8DM3VxYdHXMtStPZr8u9XUkx/1ehGnHZcpAAUi4JbH+yreNHiciwrgU3Sh6I20hoUDDJDtOO7rLNcc7z+m89zJdZIgNG+lOnxLLOzbzyLxoyousBeabaNi1kra2cDYX0J3xJyDJnWhQBPdMoq6eCT6LGaMc3CGVuC5DztyjzkZZgZbGYcr9n/gfrjgrtQ+3msv7qpbb9cHqrKlbxQmx3/UWhqknx8hza9vR7pI5X3zf/RM8kzT0u59ZbT9yDbUjJR1qeX21Ew== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:jBAasA8wBljcklghF/04i6kyIvp/tAPVgahzwCwASA9b6YT2/VX1tbbxT86nxNj3s/cpTHiEdC/jRimSu26/dopdx3Ce8HyV6/KLhP7Jk2iZDmLaJqhgjTHE0uGewN9Txz2Gmw3TD+fsyhknRTYFUi70ep/YoWl8fxzYBZRyQpwshgR4YlCp6qNOidYIzPeJjGo+8xE8zMuE22/5hKEdD2ENULCgTv5Lrxw0NZEpG1pceRdsuQMV/WAP/pOa9DcLrGgrRgg+NQjraFkWCa1kRw==; 20:tFSSss6Yo0hAKe716Zru5Aim6wXiltE6DYDpw+Qv5e9c/xYHtcK/Je8mMbOTVf94ZnV+7zx1r8KsPKA1phS03eP79wx0T5kTd/63C+slf2KVN9h0Wc1cXWXFyklmP2gzInl/8w/B97pM3MhICH3S47TM1lcM0p+Rcu3PFk71q+D+pebTmOfqpbzhFLtC07Lku29icddCb6z829EpGWfZ0H8a38FtZX8M8p2K35GQdygM6Pdvq/Ep/sPrrH84w3E4z0dzwXobV9QR8hZbl809gAYT5dwexVgW9dgA57yVx2VwB2YI03R6MqHQV6r3cdQ7ce5DXKuMefoKxALQxKKz52bQutfSt8n9bwfw35QdbTLVsSpfAVvOpabGTXjVS2hWgM2Bf7xAcIuYfEca7dzWisvLxEiqAs5ohn1X4IfPtqYRExsPqIPlWqw4Ijezzf6z5/l/eF2pb9KU7SvJwNE8MYTLqnxh54bZLTjqd735gwhDh7rfZEhRnb+PP4+8z9kXWxaaRojdcrUXJuMhBmRWqFlqMWZFbPu8mPFuPs1wpUYi6jkyka3mySYWB/lBBKCLH53Bibd+gJSmaH6K8TqytEGf3J9SN3cyC8dzSeRj+u8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(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:zEspggppmAYvJ8bOZ6/qfK9KSDFPTzgPxARkRdSKdf9cx9wPVLae9dZc2Y5HsPoz3B0GcKLDmnPTHZVm0Bn+P3ylpH+xJLyjDpURz5b9SlWHXXv9htFt3jG8wmzrn5rhBDpsKZP2z73mHcVzaKTy8u3kx/tWruZjtxyZVRIOCKt9i3eBxIhNMyANDdjl0woIRgF15HDkVDsnMfzrXzPFDt6iGer+BFbcnMtlRKLblJTsXQHuO+wG7W5rYHgUrZrCNGIvs3OKGRNLsvRiIOTOPPnOk5jDWyGPS/NzZxiqQCaxepxFAJ+kgRfywMo5ErKv3VDz+81+AXgCcidGUOVsdPJgTp/RrgwxeOF9Ux2NV08akIeqqybwUiwA3+Cf3NmZ4Sbk7i5Xy4TWrt6Jr9deVHV9IIFgC8uLsy03aqeBgQRfY0N82dGZr0D2jy8K4iFci+s38mltvzwKondQFVrO/YkQo4kGpXDctfYsgqxjZtCuRUftLwQMQ45PVlKFV0ozSC9OrVMnMq5yDc9yENtZh0yr+/USIkXcTlmlPPaICOSI6kSrWD+hmAsDqJngf+JEH6UASEcTiXGGLCoSJpCyj5kAX4YuqE9UHzdpQBJLw3lF7BZmc68mcXoShQIUiT9zqGBItBIo18t3gW4lS0/s0w== 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)(76176999)(81156014)(50226002)(2906002)(110136003)(33646002)(6916009)(101416001)(42882006)(2950100002)(6666003)(4326007)(81166006)(38730400001)(105586002)(8676002)(106356001)(5660300001)(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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soI9XZAWV5gtJoAgPvJRSdop+As= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:Do8enEXVC3wUbSz02Czf4TBcUEVJwHtnawBpH/gpRgB9VwWRVJdxYIIaxyvqaCY96LXiL+FD+LJ0pNO+LBB097Xb1AHlnS4M0itrEvRfMGPz4ex9Rd3m/H6boWBytovX0YfoA3KnXo6IrvFhbRQInLT8j2TWzCA+Z6142qpVDTDvDcqMTJ8y4KhF0K7oLVjx/8XQfHBdhEADeZEWB8DhQa5i1vh9y3dBu48ZbAtohPAxGYqrIKfJ5O1lOa0LIeK0nzElhIlgPn24fogo5AfyJImPRhAPV40Px4cV7ch7ioGvcT3fI4/RsetMJkPUznFxbi4jREDS46nb5Q5pnA79ngX5jIz113+mdt4K5De/uvszguICQ6E7pdefvdNOPDaMX2br5UsMNIX5ZOfLwgAM+KCuETPBg+eifr6vaod6Egh1CG55AHoiwRgyVWH4LOHJj5OY5Y5AUu0RKdaqnOsEMw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2016 01:59:24.9633 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 27/28] net/vmxnet3: 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, 14 Dec 2016 01:59:30 -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. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob CC: Yong Wang --- drivers/net/vmxnet3/vmxnet3_ethdev.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h index 7d3b11e..5b6501b 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.h +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h @@ -34,6 +34,8 @@ #ifndef _VMXNET3_ETHDEV_H_ #define _VMXNET3_ETHDEV_H_ +#include + #define VMXNET3_MAX_MAC_ADDRS 1 /* UPT feature to negotiate */ @@ -120,7 +122,11 @@ struct vmxnet3_hw { /* Config space read/writes */ -#define VMXNET3_PCI_REG(reg) (*((volatile uint32_t *)(reg))) +#define VMXNET3_PCI_REG(reg) ({ \ + uint32_t __val; \ + __val = rte_readl(reg); \ + __val; \ +}) static inline uint32_t vmxnet3_read_addr(volatile void *addr) @@ -128,9 +134,9 @@ vmxnet3_read_addr(volatile void *addr) return VMXNET3_PCI_REG(addr); } -#define VMXNET3_PCI_REG_WRITE(reg, value) do { \ - VMXNET3_PCI_REG((reg)) = (value); \ -} while(0) +#define VMXNET3_PCI_REG_WRITE(reg, value) ({ \ + rte_writel(value, reg); \ +}) #define VMXNET3_PCI_BAR0_REG_ADDR(hw, reg) \ ((volatile uint32_t *)((char *)(hw)->hw_addr0 + (reg))) -- 2.5.5