Warn about reaching various PF limits.
Reviewed by: glebius Obtained from: WHEEL Systems
This commit is contained in:
parent
ab28d4d3cf
commit
f5002be657
@ -713,6 +713,7 @@ pf_initialize()
|
||||
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
|
||||
V_pf_limits[PF_LIMIT_STATES].zone = V_pf_state_z;
|
||||
uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT);
|
||||
uma_zone_set_warning(V_pf_state_z, "PF states limit reached");
|
||||
|
||||
V_pf_state_key_z = uma_zcreate("pf state keys",
|
||||
sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL,
|
||||
@ -734,6 +735,7 @@ pf_initialize()
|
||||
0);
|
||||
V_pf_limits[PF_LIMIT_SRC_NODES].zone = V_pf_sources_z;
|
||||
uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT);
|
||||
uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached");
|
||||
V_pf_srchash = malloc(V_pf_srchashsize * sizeof(struct pf_srchash),
|
||||
M_PFHASH, M_WAITOK|M_ZERO);
|
||||
V_pf_srchashmask = V_pf_srchashsize - 1;
|
||||
|
@ -161,6 +161,7 @@ pf_normalize_init(void)
|
||||
V_pf_limits[PF_LIMIT_FRAGS].zone = V_pf_frent_z;
|
||||
V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT;
|
||||
uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT);
|
||||
uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached");
|
||||
|
||||
mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user