svn commit: r212912 - stable/7/sys/netinet
John Baldwin
jhb at FreeBSD.org
Mon Sep 20 18:41:16 UTC 2010
Author: jhb
Date: Mon Sep 20 18:41:15 2010
New Revision: 212912
URL: http://svn.freebsd.org/changeset/base/212912
Log:
MFC 211888: Simplify the tcp pcblist estimate logic slightly.
Modified:
stable/7/sys/netinet/tcp_subr.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/netinet/tcp_subr.c
==============================================================================
--- stable/7/sys/netinet/tcp_subr.c Mon Sep 20 18:40:54 2010 (r212911)
+++ stable/7/sys/netinet/tcp_subr.c Mon Sep 20 18:41:15 2010 (r212912)
@@ -937,11 +937,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
* resource-intensive to repeat twice on every request.
*/
if (req->oldptr == NULL) {
- m = syncache_pcbcount();
- n = tcbinfo.ipi_count;
- n += imax((m + n) / 8, 10);
- req->oldidx = 2 * (sizeof xig) +
- (m + n) * sizeof(struct xtcpcb);
+ n = 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-all
mailing list