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
This commit is contained in:
parent
5edfa04b94
commit
0ad5ef9c8f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236364
@ -298,7 +298,7 @@ init_zone_var(void)
|
|||||||
V_pf_altq_pl = V_pf_pooladdr_pl = NULL;
|
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_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL;
|
||||||
V_pf_state_scrub_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
|
void
|
||||||
@ -317,6 +317,7 @@ cleanup_pf_zone(void)
|
|||||||
UMA_DESTROY(V_pf_cent_pl);
|
UMA_DESTROY(V_pf_cent_pl);
|
||||||
UMA_DESTROY(V_pfr_ktable_pl);
|
UMA_DESTROY(V_pfr_ktable_pl);
|
||||||
UMA_DESTROY(V_pfr_kentry_pl);
|
UMA_DESTROY(V_pfr_kentry_pl);
|
||||||
|
UMA_DESTROY(V_pfr_kcounters_pl);
|
||||||
UMA_DESTROY(V_pf_state_scrub_pl);
|
UMA_DESTROY(V_pf_state_scrub_pl);
|
||||||
UMA_DESTROY(V_pfi_addr_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_pf_pooladdr_pl, struct pf_pooladdr, "pfpooladdrpl");
|
||||||
UMA_CREATE(V_pfr_ktable_pl, struct pfr_ktable, "pfrktable");
|
UMA_CREATE(V_pfr_ktable_pl, struct pfr_ktable, "pfrktable");
|
||||||
UMA_CREATE(V_pfr_kentry_pl, struct pfr_kentry, "pfrkentry");
|
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_frent_pl, struct pf_frent, "pffrent");
|
||||||
UMA_CREATE(V_pf_frag_pl, struct pf_fragment, "pffrag");
|
UMA_CREATE(V_pf_frag_pl, struct pf_fragment, "pffrag");
|
||||||
UMA_CREATE(V_pf_cache_pl, struct pf_fragment, "pffrcache");
|
UMA_CREATE(V_pf_cache_pl, struct pf_fragment, "pffrcache");
|
||||||
|
@ -179,7 +179,6 @@ struct pfr_walktree {
|
|||||||
VNET_DEFINE(uma_zone_t, pfr_ktable_pl);
|
VNET_DEFINE(uma_zone_t, pfr_ktable_pl);
|
||||||
VNET_DEFINE(uma_zone_t, pfr_kentry_pl);
|
VNET_DEFINE(uma_zone_t, pfr_kentry_pl);
|
||||||
VNET_DEFINE(uma_zone_t, pfr_kcounters_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);
|
VNET_DEFINE(struct sockaddr_in, pfr_sin);
|
||||||
#define V_pfr_sin VNET(pfr_sin)
|
#define V_pfr_sin VNET(pfr_sin)
|
||||||
VNET_DEFINE(struct sockaddr_in6, pfr_sin6);
|
VNET_DEFINE(struct sockaddr_in6, pfr_sin6);
|
||||||
|
@ -1868,6 +1868,8 @@ VNET_DECLARE(uma_zone_t, pfr_ktable_pl);
|
|||||||
#define V_pfr_ktable_pl VNET(pfr_ktable_pl)
|
#define V_pfr_ktable_pl VNET(pfr_ktable_pl)
|
||||||
VNET_DECLARE(uma_zone_t, pfr_kentry_pl);
|
VNET_DECLARE(uma_zone_t, pfr_kentry_pl);
|
||||||
#define V_pfr_kentry_pl VNET(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);
|
VNET_DECLARE(uma_zone_t, pf_cache_pl);
|
||||||
#define V_pf_cache_pl VNET(pf_cache_pl)
|
#define V_pf_cache_pl VNET(pf_cache_pl)
|
||||||
VNET_DECLARE(uma_zone_t, pf_cent_pl);
|
VNET_DECLARE(uma_zone_t, pf_cent_pl);
|
||||||
|
Loading…
Reference in New Issue
Block a user