| 258 | |
| 259 | #ifdef VIMAGE |
| 260 | void |
| 261 | tcp_hc_destroy(void) |
| 262 | { |
| 263 | int i; |
| 264 | |
| 265 | callout_drain(&V_tcp_hc_callout); |
| 266 | |
| 267 | /* Purge all hc entries. */ |
| 268 | tcp_hc_purge_internal(1); |
| 269 | |
| 270 | /* Free the uma zone and the allocated hash table. */ |
| 271 | uma_zdestroy(V_tcp_hostcache.zone); |
| 272 | |
| 273 | for (i = 0; i < V_tcp_hostcache.hashsize; i++) |
| 274 | mtx_destroy(&V_tcp_hostcache.hashbase[i].hch_mtx); |
| 275 | free(V_tcp_hostcache.hashbase, M_HOSTCACHE); |
| 276 | } |
| 277 | #endif |
| 278 | |
| 279 | /* |
no test coverage detected