From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0049.outbound.protection.outlook.com [104.47.38.49]) by dpdk.org (Postfix) with ESMTP id 48DFEFA57 for ; Mon, 16 Jan 2017 04:27:03 +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=RW7212x7ALdwad3tqPfqk8XCzZda+VLhAAokIH5J+S8=; b=fbV/xtQYFjWR3oichn0XnzdkfnBZIxfvW+emgrHALoK3yd3bVQ4Fh2cYxx129ZsAPQ0MvjzhRS888aoY4EHQDSIM2g3u9oUVPtLXOwSOjU+GS39w5qkK05pgpT+ThRAB/6BQjn0LQcC1c8JwfnOg1eTqohPL4AWbWJBPr6qeL4w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.171.223.66) by BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.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 03:26:58 +0000 Date: Mon, 16 Jan 2017 08:56:41 +0530 From: Jerin Jacob To: Thomas Monjalon CC: , , , , , Message-ID: <20170116032640.GA6271@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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2622450.7mMCSCBjjk@xps13> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.171.223.66] X-ClientProxiedBy: PN1PR01CA0114.INDPRD01.PROD.OUTLOOK.COM (10.174.144.30) To BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) X-MS-Office365-Filtering-Correlation-Id: e9400c2c-7af8-41be-07b5-08d43dbf88cd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 3:9bD/f0Np4Z79OmRgicOkH+jO2X4u8I2JhsMjtXtHAtvXtwUupsHTYSoWQ+mgWYjZ8RiXA33Y1VugycqukyEHjMjsOteh/myfx79u2EXha7fu4/puH6Kz4YpRZz76Hzexm/Fg4KU9GGc5IAWyBQ2EvTO1yMTkJWHvr6KvQqkfITvDb49qQdpr/hk/RLn2x7ZPNdyLjbct4SLP+SAkxu/kY3rioTTatVgtZFzVO02YswZMyZJ3pEkNp+2IAHQoERf3h1T/gYOxbDNBWWX7MtDuFw==; 25:L71+1ZvLFrxLCVjeezCLGmWEfHniG7lshf2GZ11taR5f+0SCDC91lhjuB9s5Afd1d1vGJVcffMuQNeJi9mvlphBjRYIhfutuBc/cHFQDpQQneNENPjG2anIgOYdZ5QGWJUVNFADh4UwniaCQSaOquxmRav2TaJR8+lqhQyeTfTB2s6o82r82V1KT7GQ5jx5yERrImeGEdpgOCYtQckf91vV+BWdEqChIZWJ4iEZZQxQKfjkS8uylL6445J6MoVbHvsYw+yhFKfCKJK3ti7RY4qdXZgsPBPgNgMZPaEQRrD5cBoICCukiP+/99aiddYUQn20CR9Xq/gvhE192b/eJNSvoTwgc2F8FlAeNG7dKLHA5iKFm0bKqOtavCcSfP5BnnawtEikLU4hVppH2FS6N7KkSwL6tgA0Tq/lk3Gd4Rk9G4KsTS2vyf8mUIpIQNg7fRluYqAeI11aAogydFc+NSg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 31:PAykV8mFwtAiAHS2mgybqY8oix+yLhNYxuRdonnzA19kcdxDN+XWtIfILLV7c/VW3ekIGf1Wd8wEYUbPb/+c3o9Itn/JKIOYEb6VP6t9xClRfO4NGDp9WPEKVps9RPrxADUNW2qxcOERmrR8mAiHAg/uCj2Obw8d1Pooo7pmhBM2Vyh764SZi1ka3cw0qUrgTbhA6eC56jLZEJFhmXFioyeYK9sLqQYt/k5oZ+7K+Mp3i4I/nJzCdyXQpRVyl1L0; 20:kAp/mwLIcYAAaiKUOQC6QyfD0p2e+hJnKiywqk/s37m6o8Xt7XcLSkrgC+rOenfl7T7VDLChXDvLtDtjaz4sTJvVNTmelX+IISICVM4CBpGFOBDhyL82I/KyYp9r4oMtjXIXnK+LiRRdgk2LejzBDIEwJJNpI1rBZ1h58dShEaBD7PHhvNguiNaEzuQh6HJ8NewLwOvy7tOvxyGET/Ex55jnkAM0F2pNgDKF+bQmKxnosNRHTiedrlwLx7TIaIYwJXSVDChaTPEKDb2IuJJNEcYBQEBT9vCaJzPUD6X5Ap8baB+5chLm1/MhB23lL8vcf13jDhbKFtvqMkXfjJoFMTj2cyMYFUsBpgpbJ+e2k39YcgXASTu6nF+/ApCk6WQT442dpJcRu+ZiNsSIzwk4qfRKwlmdcB0LvY6XSIWPaSvd9wyCBbDFy7+FWPiwfcC3omxUK2YdGBvRseHsDrf8JnN9D/Jg1ln2u7p1p2IjuAsdsIed9cmJklseToge6oKliT3gZ9s+kW/zVOCMnEEUzNjohkNiCceTlPs0BtiNhvHqtv8+6lZwsORfkET1IUM/MOgpa91/gKGhMwm8Q1S2BNu26jsqWtsuq/wMckkgPS8= 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)(3002001)(10201501046)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BY1PR0701MB1722; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 4:ah6XxgQcdnI7zHZDr6dt9gcjUPXuxRCq4zoxX9jA/mXOJ3MD4Hz8T5kKywR99fbX8qnYD+MpTQGYsCwiry8jq7tRDCNHmI+6MUK9wAjwPPnHNfVH57Frxr3yy827QpRGe6W7tODmr98l+gBvHY9EGS6c/G0BB4Sa/E78cWs6GtonFISCOxBT7n8rvVmuWfOv9qD3otgb4BMLYdBumWCQNvBJY4RPTMOgf6VCYhu0Gar4/zmB3lMwJGxo8cyIdat/2YedZtrB5j5eyMQUUUspcZxw4apEg4qFTAyM9Vf5k4uKNJkXd7EcRuuE1yyj97OYfTaSYOod2EyeVApQ+Yhk8eBL3WvZKwPuRaJW+rvQr7v+P2vebWXhhrUY0JhYZUUPzaGVTQaH2MBv00lsq3Xu2vDrnPXHhTzW85YU5P9FxgzmCcihg2g9PbqWFgHoDJs9POdNy0EM+OJm5dnL/s2FCAgD55BRiehc74Fu420Yr/5Z0/puHGPvGru5qbKE8DBPT7KHUdxN0HFfwwy2Ui/Td8oHrAHUU3Bnqi7/7iwbbN6iiHbMKrkuyV5q1Pl/YLtxUN1oiCyslecIRZ/QfCDpddekhaMj4JZ7isJQPWGSvRI= X-Forefront-PRVS: 01894AD3B8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(24454002)(189002)(377424004)(199003)(8676002)(81156014)(81166006)(1076002)(97756001)(6116002)(23726003)(3846002)(4326007)(6506006)(2906002)(93886004)(38730400001)(229853002)(25786008)(54906002)(92566002)(55016002)(97736004)(107886002)(4001350100001)(305945005)(9686003)(68736007)(27001)(189998001)(7736002)(33656002)(4001430100002)(54356999)(106356001)(47776003)(50986999)(5660300001)(76176999)(110136003)(6666003)(42882006)(2950100002)(6916009)(66066001)(61506002)(50466002)(42186005)(101416001)(46406003)(83506001)(105586002)(18370500001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1722; H:localhost.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; BY1PR0701MB1722; 23:hITTp85Ay+yRwHqCPbrpUSU4L59ayovcIM4KHIe?= =?us-ascii?Q?sau52fRsjx7I8kSB+2ZpTWT1OD+4OREIZPPE0sJrP9TYbqqmP1aqxJzmDQHC?= =?us-ascii?Q?EdK2G29SpJa1k2tplHusFLgQkW2zoic982HliRu7T4q5ck5L68V0MQYTvCDo?= =?us-ascii?Q?pBULSiWB4PKc/DPCe1Ar9qeBWoY9twukS/swzAAAXXmR00PcT8uDGVnulDOy?= =?us-ascii?Q?gyS0jhcI2DPUAoeB1S8+g2hkdBBZHRh/Tmwu3kHtKi+uYQzUMLjVoUoAFVfn?= =?us-ascii?Q?MDe2ucb8F9cYOwEJPSYgsJIAJ0e8tG1K9tI1zG14BoMoaLximBuhDdnQyzei?= =?us-ascii?Q?53pTuDsJ55HkPRyQP//sbtbi2FQLXoXmzlJq0kyXQ+k4c6I4/9Rrz4T8hhvH?= =?us-ascii?Q?nysF0/lvXIIc2pbDkJRa4h+HqPPSWnCYFP7eVqZvH0LXwapB77L/uLwwBpyB?= =?us-ascii?Q?fKTgWZhAHwAatueTcPPFUSYdkJOrujOCofZ0m/MMJiLxZgXwBk7QSZOva/ty?= =?us-ascii?Q?mb6b4du7QZ+LLSrql4us43FxcwriVLB6SMgDsHsiNeNq03abisYATqspT7W+?= =?us-ascii?Q?68idWv88oPGhKU+M2xjNU/z0ylAwjSY/C7EU5bfuUrEH8HsO3QS5D7Qwqrug?= =?us-ascii?Q?LhTtOWYPKo80RopNVTYIQRXldrVBA4TYzXeHyp/7pzy7vYyPxzsMFh7uLaA2?= =?us-ascii?Q?obDgoapWS3Pwv6zDjnadErYKjUqIEY3MyA9gV+ZS2kLLlE14jpuAGE8Jeqtj?= =?us-ascii?Q?MZerEJ8U9yMFlp1dNdb9qmCJIEGO2tMhFEJqOCslNeoOoAy+GEDIh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MThL5LIC24f/ryxRbdKczsajLgX1fwgJBK9fP+F3yjHeXOB3E1vNZSsvQ3pCGUscavmvTQSAFE4R/ZPBzcIBJwgX5mrDShEULVqUcSYWCfzJw4BE72M9XZd5E6+7mJDU0=; 5:dfxspPRxN0MNAJ8hH7xR54KIRB0lK104zh/HDLbDXQm+HIUBk2w8088v00WlD7pPFyr99riaHjwlMMfLZuGgIrhMdTKID4pxZ3Oe210V/arDAhYcPejOqFOx/jbf5mlPjvyCcOPLIdI9qSKwBkuEFk/eUrCbdAZdhBu/ip+6mxY=; 24:tj1DG9ndVJyCS8aXrK8nfG2NMyWh2JLnesDIvD+Vl9nlO2osFxulU4/+QLyplzXF4oAQEMRDq/5yN3rp8vSsyttHUOZbOMBqIKCncoo9d/4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 7:SWT5OUjdN9jqNxgyDi1C1MhK4OF7fJZHEvpKvCL76zChN5NkB8xzNwtNS1YDcRwvZNjDEND4Ulw4I+YQmTD9p9dd0nuet//JAFgyEe0N8YMkyS7bAJjt5E0Xv4+eurS39irywkesl1ePRxz/b9f19T3S0PcCK2pgaLYpgy34m64yd2luhE/Oc7zeKyC3TsYyl5k4ws/gjyzyuWRdpypUE8H2xnspCPDNMG0Be57XT3Y2D6IDrRQ0f8qlCo08vGR4VhLCPAHAdcWyf3K4Tl9EPhIG/3V6aUbfI7FHBeQzEWC05DZ7tUCCd1/SAFI4K64KjJi53GLOvdc9m/3PAFE+5xsfnlI+GpaResymXiDCefER1UkceSWQwJJ5X01V0usu4cC94+9vX0/+d3pDzELuS67zBbtQVj+XpkUTvZ3qXBWINX0WXELTp1GPcsOL9iLhIbDVy00gvGCxM3aT0n5ziQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2017 03:26:58.0124 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1722 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 03:27:03 -0000 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. > It won't provide the same "debuggability".