aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-02-07 14:31:51 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-02-07 14:31:51 +0000
commit92f8975ff4d6e1b36ba78057aaa0a54759416ca2 (patch)
tree5aa766019f6410cdb05f5683cfcde7a202765335 /sys/netinet/tcp_syncache.c
parent0a5a3ccb8197ad6617f067274ac91a790f857328 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index e060beb9978d..781e01b97897 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -126,7 +126,6 @@ struct syncache *syncache_lookup(struct in_conninfo *, struct syncache_head **);
static int syncache_respond(struct syncache *);
static struct socket *syncache_socket(struct syncache *, struct socket *,
struct mbuf *m);
-static int syncache_sysctl_count(SYSCTL_HANDLER_ARGS);
static void syncache_timeout(struct syncache *sc, struct syncache_head *sch,
int docallout);
static void syncache_timer(void *);
@@ -170,9 +169,8 @@ SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN,
&VNET_NAME(tcp_syncache.cache_limit), 0,
"Overall entry limit for syncache");
-SYSCTL_VNET_PROC(_net_inet_tcp_syncache, OID_AUTO, count, (CTLTYPE_UINT|CTLFLAG_RD),
- NULL, 0, &syncache_sysctl_count, "IU",
- "Current number of entries in syncache");
+SYSCTL_UMA_CUR(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_VNET,
+ &VNET_NAME(tcp_syncache.zone), "Current number of entries in syncache");
SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN,
&VNET_NAME(tcp_syncache.hashsize), 0,
@@ -328,15 +326,6 @@ syncache_destroy(void)
}
#endif
-static int
-syncache_sysctl_count(SYSCTL_HANDLER_ARGS)
-{
- int count;
-
- count = uma_zone_get_cur(V_tcp_syncache.zone);
- return (sysctl_handle_int(oidp, &count, 0, req));
-}
-
/*
* Inserts a syncache entry into the specified bucket row.
* Locks and unlocks the syncache_head autonomously.