From owner-svn-src-stable-9@FreeBSD.ORG Fri Jun 29 12:11:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD403106564A; Fri, 29 Jun 2012 12:11:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5F58FC1A; Fri, 29 Jun 2012 12:11:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5TCBWmF044845; Fri, 29 Jun 2012 12:11:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TCBWom044841; Fri, 29 Jun 2012 12:11:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201206291211.q5TCBWom044841@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 29 Jun 2012 12:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237776 - stable/9/sys/contrib/pf/net X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 12:11:32 -0000 Author: glebius Date: Fri Jun 29 12:11:31 2012 New Revision: 237776 URL: http://svn.freebsd.org/changeset/base/237776 Log: Merge r236364 from head by eri@: Correct table counter functionality to not panic. This was caused by not proper initialization of necessary parameters. PR: 168200 Reviewed by: bz@, glebius@ MFC after: 1 week Modified: stable/9/sys/contrib/pf/net/pf_ioctl.c stable/9/sys/contrib/pf/net/pf_table.c stable/9/sys/contrib/pf/net/pfvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/contrib/pf/ (props changed) Modified: stable/9/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- stable/9/sys/contrib/pf/net/pf_ioctl.c Fri Jun 29 12:08:26 2012 (r237775) +++ stable/9/sys/contrib/pf/net/pf_ioctl.c Fri Jun 29 12:11:31 2012 (r237776) @@ -298,7 +298,7 @@ init_zone_var(void) V_pf_altq_pl = V_pf_pooladdr_pl = NULL; V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL; V_pf_state_scrub_pl = NULL; - V_pfr_ktable_pl = V_pfr_kentry_pl = NULL; + V_pfr_ktable_pl = V_pfr_kentry_pl = V_pfr_kcounters_pl = NULL; } void @@ -317,6 +317,7 @@ cleanup_pf_zone(void) UMA_DESTROY(V_pf_cent_pl); UMA_DESTROY(V_pfr_ktable_pl); UMA_DESTROY(V_pfr_kentry_pl); + UMA_DESTROY(V_pfr_kcounters_pl); UMA_DESTROY(V_pf_state_scrub_pl); UMA_DESTROY(V_pfi_addr_pl); } @@ -337,6 +338,7 @@ pfattach(void) UMA_CREATE(V_pf_pooladdr_pl, struct pf_pooladdr, "pfpooladdrpl"); UMA_CREATE(V_pfr_ktable_pl, struct pfr_ktable, "pfrktable"); UMA_CREATE(V_pfr_kentry_pl, struct pfr_kentry, "pfrkentry"); + UMA_CREATE(V_pfr_kcounters_pl, struct pfr_kcounters, "pfrkcounters"); UMA_CREATE(V_pf_frent_pl, struct pf_frent, "pffrent"); UMA_CREATE(V_pf_frag_pl, struct pf_fragment, "pffrag"); UMA_CREATE(V_pf_cache_pl, struct pf_fragment, "pffrcache"); Modified: stable/9/sys/contrib/pf/net/pf_table.c ============================================================================== --- stable/9/sys/contrib/pf/net/pf_table.c Fri Jun 29 12:08:26 2012 (r237775) +++ stable/9/sys/contrib/pf/net/pf_table.c Fri Jun 29 12:11:31 2012 (r237776) @@ -179,7 +179,6 @@ struct pfr_walktree { VNET_DEFINE(uma_zone_t, pfr_ktable_pl); VNET_DEFINE(uma_zone_t, pfr_kentry_pl); VNET_DEFINE(uma_zone_t, pfr_kcounters_pl); -#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl) VNET_DEFINE(struct sockaddr_in, pfr_sin); #define V_pfr_sin VNET(pfr_sin) VNET_DEFINE(struct sockaddr_in6, pfr_sin6); Modified: stable/9/sys/contrib/pf/net/pfvar.h ============================================================================== --- stable/9/sys/contrib/pf/net/pfvar.h Fri Jun 29 12:08:26 2012 (r237775) +++ stable/9/sys/contrib/pf/net/pfvar.h Fri Jun 29 12:11:31 2012 (r237776) @@ -1868,6 +1868,8 @@ VNET_DECLARE(uma_zone_t, pfr_ktable_pl #define V_pfr_ktable_pl VNET(pfr_ktable_pl) VNET_DECLARE(uma_zone_t, pfr_kentry_pl); #define V_pfr_kentry_pl VNET(pfr_kentry_pl) +VNET_DECLARE(uma_zone_t, pfr_kcounters_pl); +#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl) VNET_DECLARE(uma_zone_t, pf_cache_pl); #define V_pf_cache_pl VNET(pf_cache_pl) VNET_DECLARE(uma_zone_t, pf_cent_pl);