MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_fastopen_destroy

Function tcp_fastopen_destroy

freebsd/netinet/tcp_fastopen.c:448–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446#pragma GCC diagnostic error "-Waddress"
447
448void
449tcp_fastopen_destroy(void)
450{
451 struct tcp_fastopen_ccache_bucket *ccb;
452 unsigned int i;
453
454 for (i = 0; i < V_tcp_fastopen_ccache.buckets; i++) {
455 ccb = &V_tcp_fastopen_ccache.base[i];
456 tcp_fastopen_ccache_bucket_trim(ccb, 0);
457 mtx_destroy(&ccb->ccb_mtx);
458 }
459
460 KASSERT(uma_zone_get_cur(V_tcp_fastopen_ccache.zone) == 0,
461 ("%s: TFO ccache zone allocation count not 0", __func__));
462 uma_zdestroy(V_tcp_fastopen_ccache.zone);
463 free(V_tcp_fastopen_ccache.base, M_TCP_FASTOPEN_CCACHE);
464
465 callout_drain(&V_tcp_fastopen_autokey_ctx.c);
466 rm_destroy(&V_tcp_fastopen_keylock);
467 uma_zdestroy(V_counter_zone);
468}
469
470unsigned int *
471tcp_fastopen_alloc_counter(void)

Callers 1

tcp_destroyFunction · 0.85

Calls 5

uma_zone_get_curFunction · 0.85
uma_zdestroyFunction · 0.85
freeFunction · 0.50
rm_destroyFunction · 0.50

Tested by

no test coverage detected