Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754000AbcJMKon (ORCPT ); Thu, 13 Oct 2016 06:44:43 -0400 Received: from mail-co1nam03on0044.outbound.protection.outlook.com ([104.47.40.44]:43704 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752940AbcJMKok (ORCPT ); Thu, 13 Oct 2016 06:44:40 -0400 From: "Mintz, Yuval" To: Arnd Bergmann CC: Ariel Elior , "everest-linux-l2@qlogic.com" , Alexander Duyck , "Amrani, Ram" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S. Miller" Subject: RE: [PATCH] qede: fix CONFIG_INFINIBAND_QEDR=m build error Thread-Topic: [PATCH] qede: fix CONFIG_INFINIBAND_QEDR=m build error Thread-Index: AQHSJHQqXc7bagFKAk28OJoEFUReSaCmEcpwgAAIVwCAAARmgIAAD4yAgAAE5aA= Date: Thu, 13 Oct 2016 10:44:36 +0000 Message-ID: References: <20161012103340.978726-1-arnd@arndb.de> <6935319.6Adbod0g1H@wuerfel> <5662883.yo8OytxU65@wuerfel> In-Reply-To: <5662883.yo8OytxU65@wuerfel> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuval.Mintz@cavium.com; x-originating-ip: [31.168.140.228] x-ms-office365-filtering-correlation-id: e1943506-9b50-454a-7d39-08d3f355ed72 x-microsoft-exchange-diagnostics: 1;SN1PR07MB2206;6:nPwtBdXODy/wg/T0JT+KwYmm8Ztns7DXInB2bRkhcRzoYB7sm//aF0HXFcudkBuq3B6vAqTgwmLKQsjHYZpBC9eBIKPUpJfy2DOSAKYeCB8y56CsPW33dZyHQbgqVEjtw9U4ciCUKRghx6Cv5O93QTLBs8sDka3TRiIXbQ8uJJdx2qHYM5Y6zxzeJiqSOsqWTgyRNFVTiUEHrvkbF543ZyBZZl9s6fFn9ROfKLQsSupcEzTMjFglmGjwi6/1IBbdOQ2VUZH63+PE54pXoe6I06QFEL0MwBqbo3i6CTWVVOSnf1qppxz+0LRWcHBBCCi7;5:UVwMNoQsLn16S5tcFtYOSKgaHQ9eNopv/auyjMjir4Qc74+gUUhYNRF7dMzwDzZzvS2oqVkUQC0kKuXb2EVOqS2yVtROZZDcuwfeYRBTL3OJzSGP3g5/+R5QRECRG40pykawQSLwFqBYT+yINyuC9jeMH1W/8BYFC2X+W1HflHA=;24:cvfh4Uiz8i4AtrKMdhdBGB3L1y8ZJ9Ew33M0pOXtyvbCzmKTAMzhWuDdJrd73AuLtcrK1lqelKk3B7UobymdfT+sF5RcfcQQ1MazA7f/FII=;7:ZU9BWRFEfxSlVS902m1jDlRkdYyGzqz9Uxfn5nbgtPo+8cJ3/tvIBkq6u0MCZFvO+ZH25DLhY9nJVDyX24Y+E1Gy26GB4vSavNCJ4UgzcvxutcuZV7QJRlIOn39CvI/b/SseRPvMfS0x2grybsGKEez9Vt/zeM4muCxyK5kG22MqepX0RXIKuvjek9KKj4nG1d2Djz3RfprX3zDvAmis4KADIqJ9SvtT8XU3zp6SDz9HWbE3HcWcNsE0tZjY+iqgWa5CMM7DoVW6EKR/kt7sEKPStEr0WChTiUCmzaOPqS0Z68rWSMmMRjqMBIFiko1NcorFNPtC/ws072KZRnP5AYLhI7YafoH2gb0OFxwSbU4= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2206; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:SN1PR07MB2206;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2206; x-forefront-prvs: 0094E3478A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(199003)(5660300001)(586003)(3280700002)(2900100001)(122556002)(87936001)(5002640100001)(3660700001)(3846002)(54356999)(9686002)(76176999)(189998001)(102836003)(6916009)(10400500002)(2950100002)(33656002)(50986999)(6116002)(68736007)(86362001)(101416001)(74316002)(2906002)(81166006)(105586002)(8936002)(93886004)(106116001)(106356001)(7846002)(99286002)(77096005)(92566002)(7696004)(11100500001)(4326007)(305945005)(76576001)(110136003)(7736002)(97736004)(81156014)(8676002)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2206;H:BL2PR07MB2306.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2016 10:44:36.7001 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9DAirBs017619 Content-Length: 1852 Lines: 39 > > > > While I don't mind, you could have argued is that we're not > > > > removing enough, not too much. > > > > I.e., perhaps the rdma_msix_* fields should also have been > > > > ifdef-ed instead. [in which case this solution would not have > > > > worked] > > > > > > That would add even more #ifdefs though. > > > > I agree. Although I'm never clear on the guidelines for the tradeoff - > > How much memory/code is considered too much so that you'd have To > > ifdef code out instead of 'wasting'? > > [I obviously don't claim 64 bytes of memory hit that threshold] > > I don't think code size should ever be a reason for an #ifdef in a .c > file: if the code is well-structured, you can always get the same object code > using if(IS_ENABLED()) checks within the code at better readability or better > compile-time coverage. > > Between if(IS_ENABLED()) checks and inline helpers, it usually doesn't matter > much either way as long as the separation between the modules is clear enough. > In the example above, removing the structure fields however would require to > move the debugging output into another inline function though. Still, the question remains - If we were to allocate X bytes of memory per-something [in this case, per qed owned PCI function], and that memory wouldn't be functional without a some CONFIG option enabled, how big should X become before we'd decide the fields should also be dependent on the option? It bears no real relevance to this case, as the fields involved are insignificantly small. But still - is there a rule of thumb here? > > BTW, are you interested in doing a v2 for this? Or would you prefer if > > we'd pick it up from here? > > I think it's better if you do a v2, as you better understand the long-term plans. I'd > be happy to test your patch in my randconfig build setup if you like. Sure.