From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0076.outbound.protection.outlook.com [104.47.36.76]) by dpdk.org (Postfix) with ESMTP id B414D5A29 for ; Fri, 13 Jan 2017 09:32:47 +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=sUyOo/95FqWChkRABAsQ3M2Uj5LmlWcBJ6YoY5t6cWA=; b=eaTbFF+JT9CphQn08ULn3WO73ddiX6fxC98KM8CF0rQuKzK1xwVgX+TprS4j397RXnNxlSMkKUQz3zs8OM3W0OtKLjxgr8MQWxv+j0sV0gEFlWdTurVqWxQEwgB2qxndCGRw7ZqmSlfChrT8eetayeA+OrKCHxTJFCrdP7kA50Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (171.61.97.114) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Fri, 13 Jan 2017 08:32:41 +0000 Date: Fri, 13 Jan 2017 14:02:23 +0530 From: Jerin Jacob To: Ferruh Yigit CC: , , , , , , , Harish Patil , Rasesh Mody Message-ID: <20170113083221.GB19741@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-18-git-send-email-jerin.jacob@caviumnetworks.com> <53b0ad99-4b69-41ef-4630-881d9797e6e8@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <53b0ad99-4b69-41ef-4630-881d9797e6e8@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [171.61.97.114] X-ClientProxiedBy: BMXPR01CA0023.INDPRD01.PROD.OUTLOOK.COM (10.174.214.161) To BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) X-MS-Office365-Filtering-Correlation-Id: 52101c86-05bb-47dd-d822-08d43b8ebf66 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 3:P5nPS3aO4BIoEXS53LLN+sEEqVkKAfUF6d9/u0u4IG5611f+rPWGRrv4/NkZwcSERSdr6CfGEwV6gsgFda6wmvfWzpoVsdYV+2Sv+X0iolKZTWi7G6uICrLlVWj7ixJuqczG2X+Al2xrBwuqMghUXhgaKmzAtLqUkcis9Nuzz16oclZcnG3yUmD5Ds2i2rqol6KoFSHp4nWRhVzk+FvX9ENcpXQgI4TlLkGnllM7pMy33Kkzj5stXwj+Eux5z2U3QApf5hShCooszUOR+X0PNQ==; 25:B9uNxuNQ+m/1Kf9mI9hBk651mZf7AqYeNgqAJ3hxg5giFojswN72lexNXfMCw9WdwldgIsOlNYT89ynDsHInyJasd73E7Bbq8qBjD7fJycV0nMJPdxZIyfYW9RdhWL5BtrOiG/x1RtVVFoKA6Sx0rXpAgDGE8l+yZywus/0AqsN6Vbg0EnZQXpFHj+y3VWX4wyzQkIwGJL3ZKtLjS8ASO7h75p4Gm/R0TowEVvYcl4XIQMBUEbuJ1sEy+8P17Bude/zZ/2di2iSXX5OLBStAhN0AG5B1lvaVPHvgihu2msnhHIb1tuc7s6L7pPT0UdjvmnuTEhTCoxqtLTPXiL0tzy80FMFUKrd2i4g9JP+jEn3BBfqv0v/cwYwUxgpjHQMHvpDUtoXZD17F1aXBtNxjs4FWnMKS9WIcB32Wg5xf281F0j26jXs/tcYhH1kQB083t+UDo02hJlU8pmh37/2aDA== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 31:WViq3MHQ9wFlvHBUdd1+rrbkQV4HEy2P1MHCbgC8uRYvBEhh9anmWrBE2ZKemDa+LC7DYgaEI6Rc2ic/kLBtFQdM3CkTenpLrma/H/T6GC+86A+lSnJS/edZSgkATIbtoV0cDlhkZUUdsaSMIzHPjg16MTxKWGG9GEQmwZaz+SRCMhUMTVKA3a+ZLyeQpOW+MXosf5+tsea3dWP2MK1gdCYfgpVKyHV4a/K1j1zfM7SMxGp5AkG+BJaSRrhwtAo/Csl5BI2H8hfyDYeJa9w/jw==; 20:M7AmshO6ygYXsnl7vlvz5GAfeEgpzsBINmhkQ/N2b2mewpbZ2AZ6TkQMNHdJGyhE44VUX8dBsLG25Epf9iSJsNJbjt3cHu8YxGCCpq0kRq5IEP7qo/yqM4Y6XT6z3rjSDQ9mm/wsDdNsHhD0vRDjRniOfQSyQfVs19nhov0rB8em9VW6WkJFtEsRGJq312RXiHIxWnvVQ8ZRykHKEtv71r4d0Du/i5PTB+8hU/AmWDSKsTwkUMfEc8d30GSQgWgDLmG4p2lEF8QaxFCzDsygJVaNIdx8H1lkd/L77248LN4CDW+2wop064Dx0NdRtUal/D2LPUMOdQjSVA+1Yb9HIzc+8eBeHh8f9sa27n3mqrofbC54w815QhDAVTw+b7GlPBOSHgvWgqLqCpXWLRO7tqFPDpP/IyoKyg9a9iGZKa+2WgtiL/wRK7Ie5ZvLHVqfBw2Go6GxmQPDzGCGpfPXxz8SLP6amLyGnTSbgwZS9KxIk+geBSvv0MJ9MQduydKJt0lzeVDVgGqOZSI2CkytaZIW7Aig+Ov1lb9e2tVvLfKRkWIn5yozP4e6/VzP+I+C7gISzgPcpqXzH4uLYLnZ5NLtTOy55eLSOIn+mpxpgbA= 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)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:YDh9jE4o2X6ZvvcESWktljNXb0tRSk/dLWT/az/cKKCAxyp5UKec++J3qd1Jy+ozk+qH0s+v9lxnSV5Vhn0XQm09ctWfLTSoknU3tKcVP66AdteGJRlqDCB/3y/yROQwzMoaDRB9rTJO1eNhgM/+kCfMfFx/oRpkKsVemigNZHPtY03+gChT1Fd7016uh8KEcTJ35L/FjE7iaFcqpnhQmw376dh991HiMC/UFl+fvGbiuNbAfnYNVOSehmJPd+P0Fq07xIaKk3ywXJyX7ozaYGV8lGEOOMUIltSeDHYFJOItk7sDhkBItpjvIRI/Tnd98aW2jMqNeTOzcURonkgvWPltGQwONbFVNkHGAKWTSlcPU8u5AKUAWFVCtfM76A2oSiHZOH9rHkI7ZWuTpFSx6Wp5X0tbKqL0daEiN6D3TFS2D3M0FpYUv4Pskl3sF+w2jGkiAnwqUT1zTBZXCkw9htOZpmKGhRA3xWQSiyw6sI9IyppZqmr+x/WA97tPvIsofr6Hk4vGpK/seMmSeC620E1ibLxrKEmMkj0FVHA83UYsrr6IOp2Mjpd24LOhN64qgtVVMmLGVHZLZHVeC2zwiQ== X-Forefront-PRVS: 018632C080 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(199003)(377454003)(189002)(24454002)(5660300001)(68736007)(50466002)(61506002)(6506006)(55016002)(81166006)(8676002)(97756001)(81156014)(54906002)(66066001)(101416001)(54356999)(76176999)(50986999)(6916009)(6666003)(42882006)(2950100002)(110136003)(25786008)(47776003)(46406003)(38730400001)(229853002)(105586002)(106356001)(4326007)(2906002)(42186005)(33656002)(7736002)(4001350100001)(9686003)(107886002)(189998001)(97736004)(92566002)(6116002)(3846002)(4001430100002)(305945005)(93886004)(1076002)(23726003)(83506001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; 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; BN3PR0701MB1720; 23:YKHVqJGZNOzy3CgZbHkXloQgPSSG55h3HWVMKEP?= =?us-ascii?Q?HmFvScWuBib6gu24fLaxiLxOofcicd0tFiWyx7ybNwElUqhFwn0D3g7Dz8og?= =?us-ascii?Q?+Nl/PSN2Rc+wBPt40eTueOxIpQzlLdVdS7HbHkinN8O8G3LwXK1iI6fBaUyZ?= =?us-ascii?Q?nKOwhgTrUUPK6x3XPg2xmJT4RhbPXmEb2yYVnz008XYqPTbNJLD4xhNl31PD?= =?us-ascii?Q?h3b7l0eln5+SX2HQKTj+L5cahOM4kaZj2E7k77FVAqJpwKo1KdNEyv7W7rmQ?= =?us-ascii?Q?nZHwAn3cYCG8mtpJJ6vGMIGiy88igzI3PVNK+5drEHH2uFhBskyUhX6jBEB9?= =?us-ascii?Q?S1Enh/hz8TOn9cr/wOtI7naYvvA9ztgD7iDAVwFrtVYOgVDSsGX3g7KmG8Pf?= =?us-ascii?Q?A5HINjs4BYdObk3Gc0WHeySWHqWOscwUOx4fkV1M7/c90dOZzHiaJGirlVHs?= =?us-ascii?Q?E1nY7xOqbKgIsW9QS2Z6TgEV4ooc93GYk2fTb0us+baDLsPojPT79fhQeJOg?= =?us-ascii?Q?jxroiEDcmTL4/7+2oQ/Euv6MJZudxmVVxUz2xgWW3BHCIjzlLnDPjm92Qu/L?= =?us-ascii?Q?SejZLy1fH1G6KEE3MSv7QYk12JDGFa5v1hqrZn0ldtHcH0w4Ldz+m3gLCMjB?= =?us-ascii?Q?9ngMe6IxNZlfSr71ApRrHEGUMcm4xaU+lTWpVIz6Kb8MvpKj94sS2ljWYK+k?= =?us-ascii?Q?Ze/3lhnE6diNkUSrBqpaBEC8FBacEyPAKGBeKvf9o/fKaFdfffvWt7Rxb9iw?= =?us-ascii?Q?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m83Ax+kpRgXsQqAIhwtud7Avdu5oAl1t726cdLNZOKeDNNsupDX4eFSqwWkchlmHYivCpKdbogQHSexG+vlgXlrY2oUFNhdtpxMRnYPxhLQB0tODP5WMrKSneNpiRyIQgDX+6WsJyA0g7czqeMnDwHbxSpM/s=; 5:VJKc4u5+slR/PSfsQ1xjoRxSKnQA1YPSuqhruyycNYj9M2zAvHbwSN6UqLUMccH1FFWy3S0q3YXozK4ZJL2Pc1ZFfhA4RLSPQF1it4QtQLbbnB19ic8gfFjt+rummffRahZpd+Bz+wRwX1RTbmErFg==; 24:Cr7qIB9pzlSTecTUE6aKdErWXU6lzNlkmMsMZJRp2EImK+iWZPigmTW0agP01R+tC5zRL+qnq4LOaVIIHfCv1BAWBzJ+l8rBDmNHVqg9dVQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 7:j0kJjimL6zq+3uSzpZcasf1RMqGC5dP+ctfvTFQ+PqIQU55qWteO1RhyrfFomc+vttC7b4ProVVpsLAq+1w1iwXL6Ud030OgBx7k2/Ek70dsv4pEaCEqUwrKvkDH0hYSnWP5I45enZIdA0DxeFZ11JpM4ad0Db3D/WslR9Wf6mKG2vwNf2t92L2NroHmvXaDRl8PGXI8ERUR60zphhQRuObYnxdWwTazSIfMUxieHgu0asMJNVkh87Tfx/DURH383SZMgyqlpaTSWQMpaVx/6Cr8eEqjmTW3b3suHPdHS+ccEg5d1JUhriGtCYPUmbq1i56HKR2KWH1mde5FEunu9WICuKVttFBphqH2oQwJNmGj2l5oxb1yp4wGVcJXIwpaZngDCymKl5xz56Txqepbsc/GblxRQqMcnk9cXHZdBzyaiG17navJX3Iv1RelbYkrRbSTsanT9O9s4hFgYvcToQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2017 08:32:41.3487 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: Re: [dpdk-dev] [PATCH v3 17/29] net/bnx2x: 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: Fri, 13 Jan 2017 08:32:48 -0000 On Thu, Jan 12, 2017 at 07:11:18PM +0000, Ferruh Yigit wrote: > On 1/12/2017 9:17 AM, Jerin Jacob wrote: > <...> > > > > @@ -1560,11 +1556,9 @@ bnx2x_reg_read32(struct bnx2x_softc *sc, size_t offset) > > #define DPM_TRIGGER_TYPE 0x40 > > > > /* Doorbell macro */ > > -#define BNX2X_DB_WRITE(db_bar, val) \ > > - *((volatile uint32_t *)(db_bar)) = (val) > > +#define BNX2X_DB_WRITE(db_bar, val) rte_write32_relaxed((val), (db_bar)) > > What is the rule to use relaxed version or not? Here is the logic followed across the driver change: 1) If the top level code is in the pattern like "explicit barrier" and then io write. Then second the io write operation can be relaxed. 2) If the code runs in slow path, To make patch clean and scope limited, use only nonrelaxed versions. > I don't know about memory barrier requirements, if it is easy, would you > mind explaining? Because I have same question for many different parts > of this patchset. > > Thanks, > ferruh