Skip to content
Browse files

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

Obtained from:	WHEEL Systems
  • Loading branch information...
1 parent c288099 commit 06973aec9aa2aef8aa4235cc2429d16e98ce7401 pjd committed Dec 8, 2012
Showing with 4 additions and 0 deletions.
  1. +2 −0 sys/netinet/in_pcb.c
  2. +1 −0 sys/netinet/tcp_subr.c
  3. +1 −0 sys/netinet/udp_usrreq.c
View
2 sys/netinet/in_pcb.c
@@ -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
1 sys/netinet/tcp_subr.c
@@ -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
1 sys/netinet/udp_usrreq.c
@@ -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);
}

0 comments on commit 06973ae

Please sign in to comment.
Something went wrong with that request. Please try again.