Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 725 Lines • ▼ Show 20 Lines | #ifdef TCP_RFC7413 | ||||
tcp_fastopen_init(); | tcp_fastopen_init(); | ||||
#endif | #endif | ||||
} | } | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
static void | static void | ||||
tcp_destroy(void *unused __unused) | tcp_destroy(void *unused __unused) | ||||
{ | { | ||||
int error; | int error, n; | ||||
/* | /* | ||||
* All our processes are gone, all our sockets should be cleaned | * All our processes are gone, all our sockets should be cleaned | ||||
* up, which means, we should be past the tcp_discardcb() calls. | * up, which means, we should be past the tcp_discardcb() calls. | ||||
* Sleep to let all tcpcb timers really disappear and then cleanup. | * Sleep to let all tcpcb timers really disappear and cleanup. | ||||
* Timewait will cleanup its queue and will be ready to go. | |||||
* XXX-BZ In theory a few ticks should be good enough to make sure | |||||
* the timers are all really gone. We should see if we could use a | |||||
* better metric here and, e.g., check a tcbcb count as an optimization? | |||||
*/ | */ | ||||
DELAY(1000000 / hz); | do { | ||||
pause("tcpdes", hz/10); | |||||
INP_LIST_RLOCK(&V_tcbinfo); | |||||
n = V_tcbinfo.ipi_count; | |||||
INP_LIST_RUNLOCK(&V_tcbinfo); | |||||
} while (n != 0); | |||||
tcp_hc_destroy(); | tcp_hc_destroy(); | ||||
syncache_destroy(); | syncache_destroy(); | ||||
tcp_tw_destroy(); | tcp_tw_destroy(); | ||||
in_pcbinfo_destroy(&V_tcbinfo); | in_pcbinfo_destroy(&V_tcbinfo); | ||||
/* tcp_discardcb() clears the sack_holes up. */ | /* tcp_discardcb() clears the sack_holes up. */ | ||||
uma_zdestroy(V_sack_hole_zone); | uma_zdestroy(V_sack_hole_zone); | ||||
uma_zdestroy(V_tcpcb_zone); | uma_zdestroy(V_tcpcb_zone); | ||||
▲ Show 20 Lines • Show All 2,254 Lines • Show Last 20 Lines |