summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
committerMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
commitbc29160df3d0b3a65d9b85a63a4589f1f9652e6b (patch)
tree7c00057a3f90cc6cfd121e2a6594d254fc72cba3 /sys/netinet/tcp_syncache.c
parent389cff511328e788e1a71dbb78154dd7d21b5fcc (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 033e506c0c8b..dc05f46c3686 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -275,6 +275,19 @@ syncache_init(void)
uma_zone_set_max(V_tcp_syncache.zone, V_tcp_syncache.cache_limit);
}
+#ifdef VIMAGE
+void
+syncache_destroy(void)
+{
+ INIT_VNET_INET(curvnet);
+
+ /* XXX walk the cache, free remaining objects, stop timers */
+
+ uma_zdestroy(V_tcp_syncache.zone);
+ FREE(V_tcp_syncache.hashbase, M_SYNCACHE);
+}
+#endif
+
/*
* Inserts a syncache entry into the specified bucket row.
* Locks and unlocks the syncache_head autonomously.