Author: jhb
Date: Mon Sep 20 18:40:54 2010
New Revision: 212911
URL: http://svn.freebsd.org/changeset/base/212911

Log:
  MFC 211888: Simplify the tcp pcblist estimate logic slightly.

Modified:
  stable/8/sys/netinet/tcp_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/tcp_subr.c
==============================================================================
--- stable/8/sys/netinet/tcp_subr.c     Mon Sep 20 18:26:37 2010        
(r212910)
+++ stable/8/sys/netinet/tcp_subr.c     Mon Sep 20 18:40:54 2010        
(r212911)
@@ -1016,11 +1016,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);
        }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to