From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755414AbcAROpV (ORCPT ); Mon, 18 Jan 2016 09:45:21 -0500 Received: from mail-db5eur01on0074.outbound.protection.outlook.com ([104.47.2.74]:48956 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755037AbcAROpQ convert rfc822-to-8bit (ORCPT ); Mon, 18 Jan 2016 09:45:16 -0500 X-Greylist: delayed 5598 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Jan 2016 09:45:16 EST From: Claudiu Manoil To: SF Markus Elfring CC: Claudiu Manoil , LKML , "kernel-janitors@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection Thread-Topic: gianfar: Less function calls in gfar_ethflow_to_filer_table() after error detection Thread-Index: AQHRT4qOoCmiGGPDMEq7f5Y6Q+Q5mp78eoCAgABb8gCABGhhoA== Date: Mon, 18 Jan 2016 13:11:54 +0000 Message-ID: References: <566ABCD9.1060404@users.sourceforge.net> <56866E7F.8080609@users.sourceforge.net> <5698C53C.8060204@users.sourceforge.net> <5698C5CB.80305@users.sourceforge.net> <1452854229.8586.48.camel@perches.com> <5698DC52.4050808@users.sourceforge.net> <1452859429.8586.52.camel@perches.com> <56992D46.8070102@users.sourceforge.net> In-Reply-To: <56992D46.8070102@users.sourceforge.net> 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=claudiu.manoil@nxp.com; x-originating-ip: [192.88.146.1] x-microsoft-exchange-diagnostics: 1;DB4PR04MB379;5:coEz7BXFx1IMqcVQp6Mhd8TDtN+yfOW0HAb52NmAn58sBN7RlDpM9BGmnPAOKSJqhKPQtNTPU1i7ui4/KTmSoH6YVPR5NegYp8HmF+u7KVFTKQktZlcINmwCfvEipz7y5jnCXX0TKuPnm3u1gXWW6A==;24:A7TKxT5rFx8xEVM9WLxsfq3gtuMHV8l2UBUp0CVkvCEMQAQkBADt5ksSg0/2RStVdvOXCreZbmnOuegg/9obZ23oH7Qvd8+lLJE0s1BWdzM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB379; x-ms-office365-filtering-correlation-id: 4138de7e-3131-4cdc-4aaa-08d32008f00f x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(101931422205132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:DB4PR04MB379;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB379; x-forefront-prvs: 08252193F3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(189002)(199003)(13464003)(377454003)(93886004)(76176999)(54356999)(1096002)(101416001)(87936001)(66066001)(5001960100002)(106356001)(189998001)(110136002)(105586002)(106116001)(4326007)(19580395003)(19580405001)(77096005)(97736004)(81156007)(2950100001)(33656002)(2900100001)(92566002)(5008740100001)(40100003)(11100500001)(86362001)(50986999)(586003)(2906002)(122556002)(6116002)(1220700001)(5002640100001)(74316001)(76576001)(5003600100002)(102836003)(5004730100002)(10400500002)(3846002)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR04MB379;H:DB4PR04MB379.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2016 13:11:54.6545 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB379 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: SF Markus Elfring [mailto:elfring@users.sourceforge.net] >Sent: Friday, January 15, 2016 7:33 PM >To: Joe Perches ; netdev@vger.kernel.org >Cc: Claudiu Manoil ; LKML kernel@vger.kernel.org>; kernel-janitors@vger.kernel.org; Julia Lawall > >Subject: Re: gianfar: Less function calls in gfar_ethflow_to_filer_table() after >error detection > >>>> local_rqfpr = kmalloc_array(2 * (MAX_FILER_IDX + 1), >>>> sizeof(unsigned int), GFP_KERNEL); >>>> if (!local_rqfpr) >>>> goto err; >>>> >>>> local_rqfcr = &local_rqfpr[MAX_FILER_IDX + 1]; >>> >>> Do you suggest to use only one array (instead of two as before) here? >> >> That's a possibility. > >Thanks for your clarification. > > >> If, as your title suggests, you really want fewer function calls, > >I am unsure at the moment if more changes will make sense in >this function implementation. > > >> (which as far as I saw, you didn't do) > >Is my wording "after error detection" insufficient eventually? > > >> that could be a mechanism to remove both an allocation and a free. > >Would any more software developers or source code reviewers like >to share their opinions in such a direction? > Hi, This kind of fixes are net-next stuff at best, no need to push them into the net tree right now. So please wait with these submissions until net-next re-opens at least. Thanks.