From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0078.outbound.protection.outlook.com [104.47.41.78]) by dpdk.org (Postfix) with ESMTP id C9ADE1DB1 for ; Mon, 16 Jan 2017 12:17:49 +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=kdYsY1r+qwd1hyQtsN7HmijTxqwTKeLKCOq2kNZDx2U=; b=X23ll6FFokBYykHwJ3/oqiSs9gQ99bQAxwzXti8xa5IVF4r3zbDCu6ool5khg5ElqKUe0wWvcIyYhdxlCfiCh03NxJLJjXw4iwzpprcYGBVjG0JFFoChXUXjrUQY/GjvPU8ca6TD9lnqgSj70bNkrbH2snKQV1+IsxsnBp2WI/w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (14.140.2.178) by CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Mon, 16 Jan 2017 11:17:43 +0000 Date: Mon, 16 Jan 2017 16:47:24 +0530 From: Jerin Jacob To: Bruce Richardson CC: Thomas Monjalon , , , , , Message-ID: <20170116111722.GA19186@localhost.localdomain> References: <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484212646-10338-12-git-send-email-jerin.jacob@caviumnetworks.com> <2622450.7mMCSCBjjk@xps13> <20170116032640.GA6271@localhost.localdomain> <20170116110127.GA15056@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170116110127.GA15056@bricha3-MOBL3.ger.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: PN1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (10.174.144.152) To CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) X-MS-Office365-Filtering-Correlation-Id: 41ef7b9a-4129-4b9c-06a4-08d43e014d7a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 3:/upcsaudzcfPXnxR6UgK0rCDOCRswQeIC8gp94gzvDbpbFa03EMeVv/uAkpJHi+rav3ylFEjvpGNA1S026V6JHGvxmxrDONNER4YkmUoReDul4QZgtm4k4acs9y1q9GAlPYeNp+u9IerJBd1J7Q5ffmBbEHZeb972C5Ty0k645zYhANxSMgnMybtMP4tJytLh8Z8Ew4P8V+DAesh3itkNvwxkuLb9YOhgnAvMucP4gGUFlzY5ur6gNU9erCVmvKlW7VYHIOYZRic2sU36s7wqg== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 25:i00BxTzFpHaczuC0QMi2QDpkUjmnK0xtud7hPB9tkfAwS/zGa65gVSSPDHt/7YoHwT7HwjoeCLF5h0sW5kVO5QE/zoJBmy99WvvAAqemUXtTUhGJWXds0KzKpLXcgwkHwJo7uLB209nGkQlLmnoDCAbM4Z0Ril4LalLY7vKiWdVsE/5beqHRYOZoCDmxFRuU2ORTR7iqWJmNfRdPCgys8dJfQwM65suBZoRUwCZ6p/PIANvYpwunkOKpPBqa8ekJNMIuXGIVVSboSOcHHZwE036XfLd/dGrnC+FPjykfrXe1ysxo5wdVBAqcXzMVLf8Jm0HtHNwW+T/W0qqvVPHytALTIWGfnFxfGcms3Um+y+lbJHD3koSIY7nMyG3CsDK8nPDfKH3+sbNfPsZ7bpQD61AhXE5jEecfcNq+CM7khn//rxfAZSx+V95deCACNwJbzLxAKAVezSNptKBVkbwiBYRHn3erxvkMxPF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pIRamIX0Xgn7P3qdr9qxOAiwVkw9msdfH98sqBlbW1kMGcSppfiux7aXr6c6iv7/l9aeApgjKAHMoaoFCEGhXxOt6wD1RXt98OlnzugU5WftRCwMCPDkvj7QQm7Dsuwr96fiCa+ZzQKpxhGDaU29TVJTyPsGKdkPd8vy7/fa6NhxTK5dywjauaNM188xo8+ouKIb5T8lPs9/M= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558021)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:CY1PR0701MB1727; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 4:Lu2Ku7jzSSKQrKPBP3lNF4pZWZJ0twHUev71FbttE8+n0tZ1HVV3zlfD9QAHQnmMEKcSrQ1C/81wWT9Q5V0wR1nq4a48XQVT++wka9H4iSWwGu3/CdeU2EEhLy3CHIcvXkutnK5YbqmhCZo0domyBe+WB2rIHo+IbB+D1EOLLYmXNboKrnf8iZKCNdyNgDdEyrgnbVDdslkvtlA/dE0/12/zPE80b34iSR/gQOFxlWSYdIkWCHnztw9q3KIl/SOgtjXJonT7jkWXgYjdKnyV5yqaWCNaPObD45aTcQ7IkUdXBYldoYE/nQb3YkzjYfUgKs2pwlrDInU1kI5UAbvAztOOWnpeWwQfBGOQ5Ct7O/x3v8p9K9Fb/lLk5USIkfDMLNOX/q6XPk+3W3W3Ns+pk1KSrCvXGfoFHhNr94b16IM6NjWfm4hjvZHTB3KbAFeuCjA7CN5/1jVjSZxjAenkCkz58NJcLu1sR7UjcYs2IJfK6P8sqjlm4MtREcaOf1b5fuZZ+rWyrGN/RB7ZHBjB2VknRHGSPqmQsuvU/ChcTqsUr/Xvj0TCSDb2RLeN1XIUhrjuHlsiUpA3wPtXVvs5rl+TstGOqkwgUF9hmVua6UU= X-Forefront-PRVS: 01894AD3B8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(199003)(24454002)(189002)(377424004)(33656002)(50466002)(4001350100001)(105586002)(4326007)(4001430100002)(54356999)(50986999)(305945005)(5009440100003)(42882006)(81166006)(2906002)(76176999)(7736002)(5660300001)(81156014)(1076002)(68736007)(97756001)(2950100002)(110136003)(6666003)(42186005)(6916009)(106356001)(189998001)(23726003)(229853002)(6116002)(6506006)(9686003)(3846002)(101416001)(8676002)(47776003)(61506002)(93886004)(25786008)(66066001)(92566002)(46406003)(107886002)(97736004)(27001)(38730400001)(54906002)(55016002)(83506001)(7099028)(110426004)(18370500001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1727; H:localhost.localdomain; 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; CY1PR0701MB1727; 23:KRY7Kj8a+UeYmMVZIIf37Xrd9NFT7UQBDkiIjxJ?= =?us-ascii?Q?jKNGICben5HS8dO9AyP5UjejXO9+OAPK8bttVMsdVUPGCfHBBWkZuDoHYUxZ?= =?us-ascii?Q?+HFmwWCAhfs+lEm6/2rNdAfwtC6aJggvKjV0Nvn+N+cjIr9Z9WyCei06VRaz?= =?us-ascii?Q?wMKNgU307uIYVx9+kTCqa1r26RyLazSq3wiOpg1WFkUYy+50fN1qBWReS5im?= =?us-ascii?Q?ggZc+Js8cdiOo+l4oKCuLz/iw3FrCbyp7m7M2eXZWgXjEk50Frv5Kk7aWUO/?= =?us-ascii?Q?n+yd+2D4C2HE0o8wKgO/qpzmdCxBpl8CA4ao59gBxvsDW4tv+J3PL2duqjL5?= =?us-ascii?Q?17uqM7iQ2fCNu5dmHG1dF83mFiPHiFj9QudGQ2VEgvooBy8EKDbM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nosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 7:32BV06aogcbzz0SBe822H0sKFxKyjC/HeOTfJ7whBaUjYij04N27+/tc8LHYV6iJDqfQW2wiuUOxLjF2ODpRVzh37rGya4AHqr+sIuSDi4JLr4yvjhqi2xurDB1xvp9XGR9NXgKw3xGdQeOKr5yCoYjQP1Nlrx2LkaEWP9uw5qVOk6vSMycLamAS4DvYmYpHVnkd9X+TOYaliLCppbm7iOUxNfblVfstQlgzbOK3fIEC+XSedopHVfi13mmlvpKBTyh9IN6tgA8zQPy4HQV5iPgGErPwtzJqso7Sq9sz231NxCqUdmwGBW6hFs3uiWbq3X7+SS0X1jfvU1yKvx4buRr7OYx9e9M5i5p0Y+I0baljr3LIeutOSWuobDJChRw5ZluwwUgla+ltccM9HgHWoHVEICT8CkVXT1IzC+tpxgq9QiGDsEC57ZOQPgQzX3D6PWQ9Ou2ezvmUwNpaODzw2Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2017 11:17:43.9355 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1727 Subject: Re: [dpdk-dev] [PATCH v3 11/29] eal: generic implementation for I/O device read/write access 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: Mon, 16 Jan 2017 11:17:50 -0000 On Mon, Jan 16, 2017 at 11:01:28AM +0000, Bruce Richardson wrote: > On Mon, Jan 16, 2017 at 08:56:41AM +0530, Jerin Jacob wrote: > > On Sun, Jan 15, 2017 at 10:29:42PM +0100, Thomas Monjalon wrote: > > > 2017-01-12 14:47, Jerin Jacob: > > > > +#define rte_read8_relaxed(addr) \ > > > > + ({ uint8_t __v = *(const volatile uint8_t *)addr; __v; }) > > > > > > Why do you prefer a macro over an inline function? > > > > In this case, I thought of avoiding any compiler behavior changes when > > adding the new EAL APIs. Earlier, drivers were using direct pointer > > dereference in code, I thought of using the macro to just substitute that to avoid > > any performance regression due to this change for easy patchset acceptance. > > > > IMO, One line macros are OK and for this specific case Linux also uses > > readl/writel as macros. > > > > Having said that, If you think it needs to be changed to "static inline", I > > am fine with that. Let me know. > > > > My preference too is to go with static inline functions over macros > whenever possible. OK. I will change to static inline then > > /Bruce > > > > It won't provide the same "debuggability".