summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-08-18 09:28:12 +0000
committerbz <bz@FreeBSD.org>2010-08-18 09:28:12 +0000
commitd4e4458c2e634c74e09fc4d5f2167804085c67f9 (patch)
tree1aead7be5c50eccc472f8d29469372751bfa48f4 /sys/netinet/tcp_subr.c
parente05774fa697a2de8152100f5bbe48cfe75a027c4 (diff)
downloadFreeBSD-src-d4e4458c2e634c74e09fc4d5f2167804085c67f9.zip
FreeBSD-src-d4e4458c2e634c74e09fc4d5f2167804085c67f9.tar.gz
When calculating the expected memory size for userspace, also take the
number of syncache entries into account for the surplus we add to account for a possible increase of records in the re-entry window. Discussed with: jhb, silby MFC after: 1 week
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index bfa3e66..f23a540 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1022,7 +1022,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (req->oldptr == NULL) {
m = syncache_pcbcount();
n = V_tcbinfo.ipi_count;
- n += imax(n / 8, 10);
+ n += imax((m + n) / 8, 10);
req->oldidx = 2 * (sizeof xig) +
(m + n) * sizeof(struct xtcpcb);
return (0);
OpenPOWER on IntegriCloud