summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_hostcache.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2008-08-20 01:05:56 +0000
committerjulian <julian@FreeBSD.org>2008-08-20 01:05:56 +0000
commit0592958505e144fa8a1cdff63ecc2e605ac5e407 (patch)
tree1a19e6226789a77aca65db762eda0fb078daa7e5 /sys/netinet/tcp_hostcache.c
parente808f0ec7052dba8316366ce3f9ae8f001c34252 (diff)
downloadFreeBSD-src-0592958505e144fa8a1cdff63ecc2e605ac5e407.zip
FreeBSD-src-0592958505e144fa8a1cdff63ecc2e605ac5e407.tar.gz
A bunch of formatting fixes brough to light by, or created by the Vimage commit
a few days ago.
Diffstat (limited to 'sys/netinet/tcp_hostcache.c')
-rw-r--r--sys/netinet/tcp_hostcache.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index bf8f616..3a7e9e1 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -248,15 +248,17 @@ tcp_hc_init(void)
/*
* Allocate the hostcache entries.
*/
- V_tcp_hostcache.zone = uma_zcreate("hostcache", sizeof(struct hc_metrics),
- NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+ V_tcp_hostcache.zone =
+ uma_zcreate("hostcache", sizeof(struct hc_metrics),
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
uma_zone_set_max(V_tcp_hostcache.zone, V_tcp_hostcache.cache_limit);
/*
* Set up periodic cache cleanup.
*/
callout_init(&V_tcp_hc_callout, CALLOUT_MPSAFE);
- callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, tcp_hc_purge, 0);
+ callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
+ tcp_hc_purge, 0);
}
/*
@@ -667,8 +669,9 @@ tcp_hc_purge(void *arg)
for (i = 0; i < V_tcp_hostcache.hashsize; i++) {
THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx);
- TAILQ_FOREACH_SAFE(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket,
- rmx_q, hc_next) {
+ TAILQ_FOREACH_SAFE(hc_entry,
+ &V_tcp_hostcache.hashbase[i].hch_bucket,
+ rmx_q, hc_next) {
if (all || hc_entry->rmx_expire <= 0) {
TAILQ_REMOVE(&V_tcp_hostcache.hashbase[i].hch_bucket,
hc_entry, rmx_q);
@@ -680,5 +683,7 @@ tcp_hc_purge(void *arg)
}
THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx);
}
- callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, tcp_hc_purge, 0);
+
+ callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
+ tcp_hc_purge, arg);
}
OpenPOWER on IntegriCloud