Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Dec 2012 12:51:07 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244031 - head/sys/netinet
Message-ID:  <201212081251.qB8Cp7Jc040800@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sat Dec  8 12:51:06 2012
New Revision: 244031
URL: http://svnweb.freebsd.org/changeset/base/244031

Log:
  More warnings for zones that depend on the kern.ipc.maxsockets limit.
  
  Obtained from:	WHEEL Systems

Modified:
  head/sys/netinet/in_pcb.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/udp_usrreq.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Sat Dec  8 10:28:21 2012	(r244030)
+++ head/sys/netinet/in_pcb.c	Sat Dec  8 12:51:06 2012	(r244031)
@@ -236,6 +236,8 @@ in_pcbinfo_init(struct inpcbinfo *pcbinf
 	    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");
 }
 
 /*

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Sat Dec  8 10:28:21 2012	(r244030)
+++ head/sys/netinet/tcp_subr.c	Sat Dec  8 12:51:06 2012	(r244031)
@@ -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();

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Sat Dec  8 10:28:21 2012	(r244030)
+++ head/sys/netinet/udp_usrreq.c	Sat Dec  8 12:51:06 2012	(r244031)
@@ -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);
 }



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