Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753981AbYGaL3s (ORCPT ); Thu, 31 Jul 2008 07:29:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751172AbYGaL3g (ORCPT ); Thu, 31 Jul 2008 07:29:36 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:42568 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbYGaL3f (ORCPT ); Thu, 31 Jul 2008 07:29:35 -0400 Subject: Re: [patch 3/4] Configure out ethtool support From: David Woodhouse To: David Miller Cc: thomas.petazzoni@free-electrons.com, linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org, michael@free-electrons.com, mpm@selenic.com, jgarzik@pobox.com, netdev@vger.kernel.org, akpm@linux-foundation.org In-Reply-To: <20080731.035121.177567346.davem@davemloft.net> References: <20080731092703.661994657@free-electrons.com> <20080731093221.236840420@free-electrons.com> <1217500967.3454.140.camel@pmac.infradead.org> <20080731.035121.177567346.davem@davemloft.net> Content-Type: text/plain Date: Thu, 31 Jul 2008 12:29:30 +0100 Message-Id: <1217503770.3454.162.camel@pmac.infradead.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1984 Lines: 52 On Thu, 2008-07-31 at 03:51 -0700, David Miller wrote: > CONFIG_INET needs it too. > > dev_disable_lro() calls the ethtool ops directly. Ah, right. That's why it didn't show up in my grep. There are solutions to that, as I said. Either we could 'select ETHTOOL' in those drivers which enable LRO by default, or we could just make sure they _don't_ enable LRO by default when CONFIG_ETHTOOL isn't set. And if we end up doing LRO generically in software where the hardware doesn't handle it, presumably we can do that without having to use ethtool to change the hardware behaviour? > But it still needs to be conditional, because as I said what I see > happening next is this CONFIG_ETHTOOL thing getting jammed into each > and every network driver. (in fact, ethtool support code in a single > driver probably drarfs the 6K savings this initial patch is giving > us). I think we can avoid that. If the actual functions and the struct ethtool_ops are static, and if we have something like... #ifdef CONFIG_ETHTOOL #define dev_set_ethtool_ops(dev, ops) dev->ethtool_ops = ops #else #define dev_set_ethtool_ops(dev, ops) (void)ops #endif ... then it should all fall out silently. (Yeah, those definitions would need 'hardening' but they're a proof of concept). > And at which point you'll have a broken system for drivers that > enable LRO and the user enables forwarding. Obviously that needs avoiding. Thanks for the technical feedback. After an offline discussion, I understand that if we can sort out the actual technical issues, you'll carry this in the net tree. Thanks. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation -- 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/