From patchwork Sat Jul 4 06:11:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyrill Gorcunov X-Patchwork-Id: 29457 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id D5C08B6F1E for ; Sat, 4 Jul 2009 16:28:33 +1000 (EST) Received: by ozlabs.org (Postfix) id BC585DDD1B; Sat, 4 Jul 2009 16:28:33 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 47F54DDD0C for ; Sat, 4 Jul 2009 16:28:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbZGDG2W (ORCPT ); Sat, 4 Jul 2009 02:28:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751322AbZGDG2V (ORCPT ); Sat, 4 Jul 2009 02:28:21 -0400 Received: from mail-bw0-f207.google.com ([209.85.218.207]:64536 "EHLO mail-bw0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbZGDG2V (ORCPT ); Sat, 4 Jul 2009 02:28:21 -0400 Received: by bwz3 with SMTP id 3so714060bwz.37 for ; Fri, 03 Jul 2009 23:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :user-agent:date:from:to:cc:subject:references:content-disposition; bh=O/hxfgZP0ENlZ4m2uOD8IgQtzu8loPwPwbDSpEUHVtc=; b=igoXhKEjSd7IqblGDX1oQn/bd2pQYEojb0KpRvXYKcsXpExRlaHNzs9rk+k3dFRKU9 wiqbI8LFx1mI4wFgkwOvH1SieP+BXG5/j/z8g4lSqPsOXOLv7iOI4ebPlsVjC5FF+jDG gK4/zkscnhIQ3QRktKP/Rgc/LL+US1+p+btMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:user-agent:date:from:to:cc:subject:references :content-disposition; b=rPj7DA+AuH73LqXNmUoSa+1a+2OIGMUL/1HL9Ht3vDvhtJY9hj3Bmq+f0GcL5jTkdW rxmyR52ci5Cgveu1oW0y+F4SURozupEStEiJ12wWmfk/PM2uIhTuABtfHN0awZc4fO5A 6EX4MPz/DZNLtsFBa+APaq3AccIGC1ZC63+bM= Received: by 10.204.120.16 with SMTP id b16mr2032995bkr.64.1246688603430; Fri, 03 Jul 2009 23:23:23 -0700 (PDT) Received: from gorcunov (95-28-133-220.broadband.corbina.ru [95.28.133.220]) by mx.google.com with ESMTPS id 35sm7550301fkt.50.2009.07.03.23.23.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Jul 2009 23:23:22 -0700 (PDT) Received: by gorcunov (Postfix, from userid 1000) id 355DD161F; Sat, 4 Jul 2009 10:23:21 +0400 (MSD) Message-Id: <20090704062321.034802084@openvz.org> User-Agent: quilt/0.47-1 Date: Sat, 04 Jul 2009 10:11:58 +0400 From: Cyrill Gorcunov To: shemminger@linux-foundation.org, kaber@trash.net, bridge@lists.linux-foundation.org, netdev@vger.kernel.org Cc: Cyrill Gorcunov Subject: [patch 2/2] net, netns_xt: shrink netns_xt members References: <20090704061156.658235360@openvz.org> Content-Disposition: inline; filename=net-br-x-tables-ifconfig Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In case if kernel was compiled without ebtables support there is no need to keep ebt_table pointers in netns_xt structure. Make it config dependent. Signed-off-by: Cyrill Gorcunov Acked-by: Stephen Hemminger --- Probably GCC will authomatically shrink the structure if the members are not in use. Please review. include/net/netns/x_tables.h | 3 +++ 1 file changed, 3 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6.git/include/net/netns/x_tables.h ===================================================================== --- linux-2.6.git.orig/include/net/netns/x_tables.h +++ linux-2.6.git/include/net/netns/x_tables.h @@ -8,8 +8,11 @@ struct ebt_table; struct netns_xt { struct list_head tables[NFPROTO_NUMPROTO]; +#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ + defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) struct ebt_table *broute_table; struct ebt_table *frame_filter; struct ebt_table *frame_nat; +#endif }; #endif