Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2012 12:11:32 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r237776 - stable/9/sys/contrib/pf/net
Message-ID:  <201206291211.q5TCBWom044841@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206291211.q5TCBWom044841>