From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0057.outbound.protection.outlook.com [104.47.41.57]) by dpdk.org (Postfix) with ESMTP id 494F7106A for ; Tue, 17 Jan 2017 15:30:50 +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=yfucWpvvPvqwwEfCI1K8itpP5Nt1Q2Ay9IzOyf8kJd0=; b=Www1HlNVHcaWxescOLyKF2fA7wZWscc7ey2IXiJ5p385/gnObrDqHZA52ihmgTzr5GyIv+Jrz2FTxts5TzhKO3HhsZ4rvHrJVPd4lfnPbAN2R/DRBRb+8ifr/vPBDEZMHUYtO1APnxdA9o9hqQg+i6i03dMEXeoy4NgnDAeTEvw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.167.185.94) 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; Tue, 17 Jan 2017 14:30:45 +0000 Date: Tue, 17 Jan 2017 20:00:28 +0530 From: Jerin Jacob To: Jan =?utf-8?Q?M=C4=99dala?= CC: Santosh Shukla , , "Ananyev, Konstantin" , Thomas Monjalon , Bruce Richardson , , , Jakub Palider Message-ID: <20170117143027.GA9201@localhost.localdomain> References: <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484637244-7548-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484637244-7548-21-git-send-email-jerin.jacob@caviumnetworks.com> <20170117141312.GA7844@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.167.185.94] X-ClientProxiedBy: BMXPR01CA0019.INDPRD01.PROD.OUTLOOK.COM (10.174.214.157) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: d3a6d732-0f40-4c9f-594b-08d43ee56e25 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:OsV/3F5nJPWf04O/rzlBo+4wXzyrz4VcFWrj37FEwi/D9nxSz+hf2OxO9CJMljgXoZS89JhRnmCZ2YWn8s8BVkgHwKT/zNAhOutbmqY+0PXHue/qH7j2bNcN1aAA6D+p3K1n35E4LjP0X8NZs+oFZP6p7flI8WpY/cVSBeFL11ugNuRwL5G8uJVtdWEcbdQMLbo+nCOTVpJcdPmmJGuYp7gmTVZJGeXFxuVTrmLqR2+rCouc7n/rNdkzWR5/nCNumcZ38hh7+v+dWVCH+vgZaQ==; 25:EkyEjXb77WhXsFwFbfFhoQqPB+Q/d0pog7Sl3ONndI6KpGdQzeVb7BYVO35G/a4GLSmhK21GnozfY2n3A51RQzks5gA2HJzCWmivTnuQbzWO5a0Tu8EpOJsrtxRc5/8bG4DGvCHlCc8/6qQtkXEvIJcLoL814ERDlekYRxgx/7YKKa/bD5JzMSJarcp0RQ2l9X8jSzBeCqTYR06mmynMaMbY+YdcKFAODFuhtIbZBPf9IH2JwYxf4aC6zAaLZqUYL4xkUHVnNaqiFaQ8hzAC7Xs5PYch2t/gB6QNCw6RHlipGKNbm2zVKucV3B4vKyIT9NYrBhV1vBhRjO/inwo2MVWvSCdy5JZ3w4gRIlr4LInFhBtQHCdhDmnFmYbPV6JGzJYym7eYURrdL7+LMmdqz/DKDQX1uYx+rYr2bwNvOFWA3fzUgett1A5iXGl5HPU8bdE2HFYAzawtXk4/40fyQg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:oJ9hiPAUvL5FxRnBOIZ+KW9o9L6WnhS9kQfhw3x6XTXdYhT72ppBWT5bIJfENMCj6MAep/MdAxF2ELs0NKyNVEYyZY0Ef5qB3zFDKqB6cI6FHCg+WOogwpbG6K5CUi3dFoinoNJrdK94CZw7KEgSPYrE+pj4md+qH7tQw6+k71hulNMr0aQuV5o/E2htLbbZE9K0g/wJLRGm07JnmqV589jSkh/wVZTBEKyxwuZO7VZYAOdSGShrmUV24VjJ2LPa; 20:aJnY0Oa5qOLr1aN5nAv8PBgX+h4/ZDiFKAeDiis5xhvysgGs+IiiZuw/A6sxDA8/i2rScOciPI8kS8Cmo2YGRdBX2E5pzhTIEfIAqRnXANbJJjoh1BR5FDpei0J4bU+xT0F2BFEGsX8ZsjaJgwzXSH+TOx52o8W8VqjDAj8WUkB25RfU83OKEKxeE1bvYkFIRilOUtViyd6IP7Q9FrHo9/TcRQ+b8gFatggLZaW4Lr3sUJsLHrw1EPcgRBSBOpz+enlOnJdcuBAz8RjuymdXOer3X2km7r0obfCXrh+j2ODYzmUoc4XqIVxqgQF6ypavfIO6HHoFVntklFIjhUPop2CHAEK3dZnfuYSPeKC0Lvd74EzvZSL6Xa2EazX1FRL1TzcRBzmnxwlziPLLTZENCFGotky3hdcytcDtLNRw6pNGVd2+kXphl2CdvcWb2mchGZRPjN8v/jzfT+XisfetS88LbvduQzkaNkzZ442lqLgM5uUKwk8RP+XGziLNdatMkwJNwq09JowRWIiS/WJ+axEjQVsEbzpjlVqk5wL0tGH8AWTl4cF3xKw0y47BiDgdZ9rUpuEyRY5moE1ZMb7x07yzLr8MeahWiBHHeWgYuRw= 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)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:Nqt+8YF2TXN2HB7eSne0o9DHmrmMoxIumJaCbKp+Orj0QAGTlL4UoyU9mRdZimiBthL0gP2nRghYd5daAsHDGcFSlf7jAZpwhlzrWc5NfNlrG9/HCxObYtWdnmQ5Q51SRtaJMfhtIEGLE2fou6Lzb67RRsn9tPYnRrr3YKU7J/uYLMfq+en2VgeJpHU7Ojfqqy3iSRdEKj3WRjh7f2TXpUKwRHQ/xW6EksF7kBkygdmoL9QRcgYHDbSWzEi+/5BDoJ3qRdq4/7WrWYfA4lGxqEDxP4d+39QHb6jjyaPSNZ1Fzk3pO0NHUgARkeQybhKOvprO+HGT4FTAEUalJbDMwWbtRfNYy3/TMWLDTBuaB8ZhZM8+QOF8hZ2MHK3D0rjhB7pgC1FkeIbjqcnTeafg5LS3Mvj9ZA3taYBu+xTQgPiqtvoflE+Oa41UOAUXrHtq0SpuxUUsU3o1LbGxvooGpjTRQCilAOuXpAw5migNri4vSFuz5dnNLjRnwUVmPrR64hz3FggMazvssB9dOaBULzKbK2qVRaeM1vo/gyXhF6lfx52zKTnuv19LjVHjnirmmwoF+J1BdsNRKDD3PRu3DQ== X-Forefront-PRVS: 01901B3451 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(51914003)(189002)(199003)(24454002)(229853002)(92566002)(25786008)(38730400001)(68736007)(23676002)(2870700001)(55016002)(6506006)(30001)(81166006)(8676002)(66066001)(101416001)(6666003)(61506002)(47776003)(97736004)(81156014)(54356999)(76176999)(105586002)(4001350100001)(50986999)(6916009)(42882006)(2950100002)(189998001)(5660300001)(83506001)(7736002)(9686003)(106356001)(42186005)(6116002)(50466002)(3846002)(110136003)(93886004)(33656002)(2906002)(54906002)(305945005)(4326007)(1076002)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; 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: =?utf-8?B?MTtCTFVQUjA3MDFNQjE3MTQ7MjM6MlMrNGJSc0RoRzBhNld0ZTJBTjFWUCtX?= =?utf-8?B?Qy96bHJEeEtRelZwelBYQzlSR0NtOWRldEYyakI3TFo1VmN4OHlsSVgvdmFn?= =?utf-8?B?UVhMbUdYTGpUYndFWTFJRG1lNzk1bVBvbHpEaDNYTCt3TnFKam83cnFoanBU?= =?utf-8?B?aytoa1lhOGhyallwVlo2VXROaVRRRUpwQkRGQ090VlZlYlIzNW9iaUV6MGFr?= =?utf-8?B?Ukl5R1JyaTJoWFI5Z3dpU2JTSFNnaXA4cVR1RVFjSUxXcXI2WFFoeHRRbHRn?= =?utf-8?B?SkRtbUU2RjFnRzVQLzFwOXpSQ2JaM2JTMVZFcTdKdW1abTlGUEE1R2NpemlL?= =?utf-8?B?QWR4d3k3MU0wU05FOTEyNEhDNUF5dENGN2o4ak5kNmNvU2QxYno1Y2RDMG1p?= =?utf-8?B?ZGNmcmg2amlhL1FSOVZENGN3d2xXN2ZtQ2puUkZsWVhFN1gwd0k0ckhKUE9M?= =?utf-8?B?SVZRaUpXT05OaGdPTDY4Wm9yUGwxN3o4MzlxQUZuNTRsYjRqQXdUZEJEM3g4?= =?utf-8?B?MnliZlc0M1BlVnVLenlBRXRock9CVWQ2V1VVanFxcmc5MXZKQ2lxeUYwQzJl?= =?utf-8?B?dVZ1UGZvNU96SE5BVGsvRDRLaG9MK29GWk5XRkhxY3g2WVdUYWZBZ2ovT0pD?= =?utf-8?B?bUpQbW9kOEd6WTMraWt1WUkzRHZWWWI4aWpmRFJaZkUrdzhXcU1qdzlkNmdF?= =?utf-8?B?QlpNZFF6d2RvU1Q2TVZFWXg2NkNjRTBESlB3MGNicWlFRmpKRnJ1V2VIRG5N?= =?utf-8?B?eUg4bnNRbVNiSUptcUpy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wPy5HV42cXceIN+4tdH3fXcV4J/o/G37fP8VTAjmRSWwK/O40BZfa9fUWKPmdXGxx/CDydy66G1auvqLi4jbBFCVmE7+jfNVARGRRUW038yByo8PKt8oKKGCL7yXSJLrEOnHWHEQqlvf9B+qD0wv2nywuzm6lRo1eSJMMJwJ45NGdv64KtItLuLW5WiKKWG/wlk8WDy27wLdK9zaW7MenrLBAVT8CMzEm20MeQBfIc6ApFjAaL/ng+LR+kzjB/heWXF3ofbtAFJk8mXWFHBmVWXT90IPv3zysVZO3IUrFcG7pS2aVAHy0HLBYDDPmEnls6mbvep2oL1bElKSXeeDgxe3PYK8e1PTTgppv03IVk3qM+NcfeLpFmar/iGAQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 14:30:45.1699 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v4 20/29] net/ena: 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: Tue, 17 Jan 2017 14:30:50 -0000 On Tue, Jan 17, 2017 at 03:27:39PM +0100, Jan Mędala wrote: > Jerin, > > Thanks for the very quick replay. > > Actually I would like to keep *ena_com* untouched, as this layer suppose to > be common between platforms. That's why it is better to leave definition in > *ena_plat_dpdk.h*. Here is the patch that I would like to propose: makes sense.I will add this change in v5. > > diff --git a/drivers/net/ena/base/ena_plat_dpdk.h > b/drivers/net/ena/base/ena_plat_dpdk.h > index 87c3bf13..7eaebf40 100644 > --- a/drivers/net/ena/base/ena_plat_dpdk.h > +++ b/drivers/net/ena/base/ena_plat_dpdk.h > @@ -44,6 +44,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -224,18 +225,8 @@ typedef uint64_t dma_addr_t; > #define ENA_MEM_ALLOC(dmadev, size) rte_zmalloc(NULL, size, 1) > #define ENA_MEM_FREE(dmadev, ptr) ({ENA_TOUCH(dmadev); rte_free(ptr); }) > > -static inline void writel(u32 value, volatile void *addr) > -{ > - *(volatile u32 *)addr = value; > -} > - > -static inline u32 readl(const volatile void *addr) > -{ > - return *(const volatile u32 *)addr; > -} > - > -#define ENA_REG_WRITE32(value, reg) writel((value), (reg)) > -#define ENA_REG_READ32(reg) readl((reg)) > +#define ENA_REG_WRITE32(value, reg) rte_write32_relaxed((value), (reg)) > +#define ENA_REG_READ32(reg) rte_read32_relaxed((reg)) > > #define ATOMIC32_INC(i32_ptr) rte_atomic32_inc(i32_ptr) > #define ATOMIC32_DEC(i32_ptr) rte_atomic32_dec(i32_ptr) > > Cheers, > Jan