More warnings for zones that depend on the kern.ipc.maxsockets limit.

Obtained from:	WHEEL Systems
This commit is contained in:
Pawel Jakub Dawidek 2012-12-08 12:51:06 +00:00
parent 46f0b27a61
commit 6acd596efb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244031
3 changed files with 4 additions and 0 deletions

View File

@ -236,6 +236,8 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name,
NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR,
inpcbzone_flags);
uma_zone_set_max(pcbinfo->ipi_zone, maxsockets);
uma_zone_set_warning(pcbinfo->ipi_zone,
"kern.ipc.maxsockets limit reached");
}
/*

View File

@ -367,6 +367,7 @@ tcp_init(void)
V_tcpcb_zone = uma_zcreate("tcpcb", sizeof(struct tcpcb_mem),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_tcpcb_zone, maxsockets);
uma_zone_set_warning(V_tcpcb_zone, "kern.ipc.maxsockets limit reached");
tcp_tw_init();
syncache_init();

View File

@ -191,6 +191,7 @@ udp_init(void)
V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_udpcb_zone, maxsockets);
uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached");
EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL,
EVENTHANDLER_PRI_ANY);
}