From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0077.outbound.protection.outlook.com [104.47.34.77]) by dpdk.org (Postfix) with ESMTP id 1505BFA68 for ; Wed, 18 Jan 2017 02:24:09 +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=WZci63JaTTP/FfDQ+4VMczq2QaQ6iPgwAQYe5Wk87Lc=; b=OeteUgFMgAkhCtTcF91QS8V/9g9djhfLB16+5OrnS6lduPBjtQh1n7+Bn87IySfeONbJLxzzyBgloeCDPAfdznfIuMmUKKSUL9XdvdHFuHcVfnJANNTQP72lFlTwVjyIgb9c0/v+B/q0AG39nfoQ+hakd6dTyN7g4o4NcpPudFU= 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:24:04 +0000 From: Jerin Jacob To: CC: , , , , , , Yong Wang , Jerin Jacob Date: Wed, 18 Jan 2017 06:51:42 +0530 Message-ID: <1484702502-25451-30-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: b221f98c-c4ee-43cc-cc24-08d43f40b2d4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 3:IK5BwkwZ4mK3D7WthsYDyrdLFYtvBD6FMqxv8EMoAwNFC9EB+nnxWTSKM1lFnQUTsxWng4PLRE21DYXwWKM85L19lahl0dVkcsM561JSn17QGAZI/GfP9ldEAUUYb5cSF4miKfYy4qYsb73qbH3QVnAx5Gck2Pw9E8wwBRAgf02zJrtEUkZtImRu6TJWtdBtttQEtNrFluUL9RqwFJAqEG2TK8ck2l0hrpZDe27+WHpma5A5wPO4sfyXxFFjM7Galo0KGf1reWVpLZNmi9M8sg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 25:mpRaSkF5t6VTNnWX/Xe9eqiGxfRlceQPqjJ7B2HXKOxXxL58iHdojDwLUJvU8qQaVuRTE1qt/D/xmKoTfx7Hlz3l8ejqpLCPBXI9dAVYubCxRA22dnZoifFE05bXEEreRx01J25YmQ0n7F2O4sj5FwOTzfi9aKMQXU5/4FtnKb6P1XE5aGDPYGxaiBzX/xAaeUgGPbCiblgyC1ICTPlYwIuQSuyymeKsnAP+R6qeTOObUtYtEHzXNaef2/nC8OFPcpF5yX/0TKrTtpfHQ/JDEvjpNFeqxYWJDdXsdgFdFdmQyX8bMKB9PGq/udLNjq6790dfUfdEXPhmvC8Xnaj5Fs6z37KHCDCb6/+k5YPbHhPPbKarrqB3YLQyI89588ZUBge5pjYd6k+HkNfmUsfQWW/Y/ZIdnWo3MpiDQ1jRRgVxdIZVJiS3NGQZkVO5LwPkJJCrWg1OlVFQnLTLcfbHEYEAeVixr7TOYSF74dLS++c8+EoVFbJR3AkliQgFSzDC7Ky4u9dT5cU0V5rpncvQpTPT7+ttrFwZ1+9uRz5Bmocr3y+sDHMLRcuN4Em1n6FroGupkhM4vMu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RKSTWZAjx1wxf2W7DI95OdHQ= 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)(3002001)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(6072148); SRVR:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:yoOFcDOrpRWqRwbdg0RDdu67swO49qgQ0mpZ0NvtHNiS5RJxSfyS/+EUNSwAZbcr6/V/BGiHchIZjYI00QUSsPZ+XweTi9+5Kw9JXr4JJlc1IyZU1Rdu/Pjwdaw3uoOf+6Pt/a1pHi1nRq9Ihqc6tTgyDpMgiqXnKVC30AqDFBKz6IK5tQ1P5gMW/UAYa0eYMd+n/s17Yy69vfiDB3nIaVb8UogSm9SVGn7K8pNLgrSPY/AhHlgJF9slsE1u0bMo5fk7k2Sfl1Q0QRfes8kvKi/utDjeVu6w2VuGlbvtx4bNugneJqWID+LJ5oIJ7Ge2ebTypC26m7m0AztZWi8XGPuwCoegk6jFU9ixCtg9pqdj3LYyCVJBn0CJzRNhrdMCHLTk1KhJ7Z8rklQDMaL6aBoVeM2ZOjhn0UzL1CUDqaxMOdPs011E9GOYPKhfqAa9YiOmPgluNSCAvsfPu5bjUad/sEFwd4ZulsaYoERlqDGx0TVA1B2zUYxrQoZHu/49jE2mAvMcTYZb9Gdu3Pjv5+tKxGwAw1tQO10DVoEqK3cenjpy1FXperB38iqT/jDEfwCkSauX8HFwHhu+uRCElp46MxCrKDXZFZD/hcPUvuSKjkwVImpnkmm+5LC9ibucZLHDoi/R1kwxLEz8QMzyzg== 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)(6666003)(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-ascii?Q?1; BY1PR0701MB1721; 23:3A2Uq7TCt2kY4JtF2fB0NSMJkquYWW63gddZlMe?= =?us-ascii?Q?f81cHgdep0SkAvsz1Mt68HTAHGU/oa8Txd/dA3/Go3dHBoSpnHuuerK3fost?= =?us-ascii?Q?K/LheBYhl7+Wk94r57RFoTJwU8tWJLERShaO4e8EKJwkDAgMTgccLcbRFylv?= =?us-ascii?Q?qYv/Gf4+tIvrC1QT9QQ3QnjReSINJemrIQnyvb8/t00GUISSBncyVbZRUmmY?= =?us-ascii?Q?82HfQ3E01rbzu+jitO5o1HW7FqQ/cbqQc7Uoqlwjoy2ux2Yd+BuSMZ7+MTEg?= =?us-ascii?Q?Fch9b6KAc2dvBRDWvnVCbMwcBZrwSw2xh1+Kslv2KQNeI1xwJLH4LwUGUTsd?= =?us-ascii?Q?c9TeNyA/nOq/NR3d/4MzHwYQjuDvp1csVZELl1892hqvc+fJeQEdIDXFaw2/?= =?us-ascii?Q?CwuqwbvXZ7Rzu6GFfbRJZXRb+q+6Lkr4814DcwUVHRBfkCRyg5aWljYzfNRt?= =?us-ascii?Q?MhUhIHoxbjBA5+2AuB/iNFdMyg+9vTWr7Xs0nEXbLEjNkaBBf1NP0hISY8U2?= =?us-ascii?Q?X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DGc3Ey/Z0b+Y93CfcOgtQcC9hxGWaMnjjwHuvujwmeXV1lCnv8zd/O9yV7/wJPFZl8FT2z+UKewEBTW3c26v7hTjf+ytVAOeVRHMPUwzjwcilB8pfZN+vk/8a4PiL0xZAg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2017 01:24:04.6724 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Subject: [dpdk-dev] [PATCH v5 29/29] 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, 18 Jan 2017 01:24:09 -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: Yong Wang Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob --- drivers/net/vmxnet3/vmxnet3_ethdev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h index 469db71..348c840 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,7 @@ struct vmxnet3_hw { /* Config space read/writes */ -#define VMXNET3_PCI_REG(reg) (*((volatile uint32_t *)(reg))) +#define VMXNET3_PCI_REG(reg) rte_read32(reg) static inline uint32_t vmxnet3_read_addr(volatile void *addr) @@ -128,9 +130,7 @@ 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_write32((value), (reg)) #define VMXNET3_PCI_BAR0_REG_ADDR(hw, reg) \ ((volatile uint32_t *)((char *)(hw)->hw_addr0 + (reg))) -- 2.5.5