From owner-svn-src-all@FreeBSD.ORG Mon Mar 12 17:19:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC3631065670; Mon, 12 Mar 2012 17:19:00 +0000 (UTC) (envelope-from zec@fer.hr) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 357CE8FC0A; Mon, 12 Mar 2012 17:18:59 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Mar 2012 18:17:49 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 Mar 2012 18:17:49 +0100 From: Marko Zec To: "Alexander V. Chernikov" Date: Mon, 12 Mar 2012 18:17:40 +0100 User-Agent: KMail/1.9.10 References: <201203121541.q2CFfa5G071067@svn.freebsd.org> In-Reply-To: <201203121541.q2CFfa5G071067@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201203121817.41503.zec@fer.hr> X-OriginalArrivalTime: 12 Mar 2012 17:17:49.0777 (UTC) FILETIME=[0CFDAC10:01CD0074] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232868 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 17:19:00 -0000 On Monday 12 March 2012 16:41:36 Alexander V. Chernikov wrote: > Author: melifaro > Date: Mon Mar 12 15:41:36 2012 > New Revision: 232868 > URL: http://svn.freebsd.org/changeset/base/232868 > > Log: > Fix VNET build broken by r232865. > Temporary remove the ability to assign different number of tables per > VNET instance. Please don't let your code remain in this state for too long. You've declared V_fw_tables_max to unconditionally resolve to a true global variable, which violates the convention of using V_ prefix in networking code exclusively for the purpose of denoting VNET-virtualized state. Thanks, Marko > Modified: > head/sys/netinet/ipfw/ip_fw2.c > head/sys/netinet/ipfw/ip_fw_private.h > > Modified: head/sys/netinet/ipfw/ip_fw2.c > =========================================================================== >=== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:13:17 2012 (r232867) > +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 12 15:41:36 2012 (r232868) @@ > -117,7 +117,7 @@ VNET_DEFINE(int, autoinc_step); > VNET_DEFINE(int, fw_one_pass) = 1; > > /* Use 128 tables by default */ > -VNET_DEFINE(int, fw_tables_max) = IPFW_TABLES_MAX; > +int fw_tables_max = IPFW_TABLES_MAX; > > /* > * Each rule belongs to one of 32 different sets (0..31). > > Modified: head/sys/netinet/ipfw/ip_fw_private.h > =========================================================================== >=== --- head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 15:13:17 > 2012 (r232867) +++ head/sys/netinet/ipfw/ip_fw_private.h Mon Mar 12 > 15:41:36 2012 (r232868) @@ -209,8 +209,8 @@ VNET_DECLARE(u_int32_t, > set_disable); > VNET_DECLARE(int, autoinc_step); > #define V_autoinc_step VNET(autoinc_step) > > -VNET_DECLARE(int, fw_tables_max); > -#define V_fw_tables_max VNET(fw_tables_max) > +extern int fw_tables_max; > +#define V_fw_tables_max fw_tables_max > > struct ip_fw_chain { > struct ip_fw *rules; /* list of rules */