summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
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 033e506..dc05f46 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.
OpenPOWER on IntegriCloud