svn commit: r211888 - head/sys/netinet

John Baldwin jhb at FreeBSD.org
Fri Aug 27 18:17:47 UTC 2010


Author: jhb
Date: Fri Aug 27 18:17:46 2010
New Revision: 211888
URL: http://svn.freebsd.org/changeset/base/211888

Log:
  Simplify the tcp pcblist estimate logic slightly.
  
  MFC after:	3 days

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Fri Aug 27 15:20:31 2010	(r211887)
+++ head/sys/netinet/tcp_subr.c	Fri Aug 27 18:17:46 2010	(r211888)
@@ -1022,11 +1022,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
 	 * resource-intensive to repeat twice on every request.
 	 */
 	if (req->oldptr == NULL) {
-		m = syncache_pcbcount();
-		n = V_tcbinfo.ipi_count;
-		n += imax((m + n) / 8, 10);
-		req->oldidx = 2 * (sizeof xig) +
-		    (m + n) * sizeof(struct xtcpcb);
+		n = V_tcbinfo.ipi_count + syncache_pcbcount();
+		n += imax(n / 8, 10);
+		req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xtcpcb);
 		return (0);
 	}
 


More information about the svn-src-head mailing list