Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755439AbaJHJNO (ORCPT ); Wed, 8 Oct 2014 05:13:14 -0400 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:56737 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754151AbaJHJNK (ORCPT ); Wed, 8 Oct 2014 05:13:10 -0400 Date: Wed, 8 Oct 2014 10:12:48 +0100 From: Russell King - ARM Linux To: David Laight Cc: "'Sergei Shtylyov'" , Lothar =?iso-8859-1?Q?Wa=DFmann?= , "netdev@vger.kernel.org" , "David S. Miller" , Frank Li , Fabio Estevam , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] net: fec: fix regression on i.MX28 introduced by rx_copybreak support Message-ID: <20141008091248.GE5182@n2100.arm.linux.org.uk> References: <1412687977-11742-1-git-send-email-LW@KARO-electronics.de> <54340FA4.509@cogentembedded.com> <063D6719AE5E284EB5DD2968C1650D6D174C6C14@AcuExch.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D174C6C14@AcuExch.aculab.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 08, 2014 at 08:54:58AM +0000, David Laight wrote: > Hmmm... in that case you may not want the compiler to convert the bit value > to a 'bool' at all. > > Passing 'id_entry->driver_data' through (that doesn't look like a field name for > 'quirk flags) would generate better code. > > Even better would be to reference the flag directly from 'ndev'. > A pointer indirection for the test if probably faster then passing > another argument. A far better idea would be to copy the quirks into the fec_net_private structure, storing them as a 'unsigned int' value, and test them from there. This is /much/ more efficient than jumping through the hoops to retrieve id_entry, and then testing the 64-bit driver_data value. I've had such a patch since about the beginning of the year (and patches which add stuff like byte queue limits, which are really needed now that we have a /huge/ transmit ring), but I can't keep up with rebasing the patch set, and properly tested and performance impacts evaluated due to the rate of FEC changes. I never finished rebasing the set after Andy's TSO work... -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/