Date: Thu, 14 Nov 2024 19:41:42 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fb7c1ac5ac49 - main - tcp: remove the looping on pcb count in tcp_destroy() Message-ID: <202411141941.4AEJfg77037292@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 commit fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-11-14 19:39:12 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-11-14 19:39:12 +0000 tcp: remove the looping on pcb count in tcp_destroy() This was useful when TCP timers were not able to reliably stop. Note that in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0. This reverts 806929d514234, b54e08e11ac15. --- sys/netinet/tcp_subr.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 8bf011afe855..872ea6249051 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -58,7 +58,6 @@ #include <sys/refcount.h> #include <sys/mbuf.h> #include <sys/priv.h> -#include <sys/proc.h> #include <sys/sdt.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -1593,24 +1592,10 @@ SYSINIT(tcp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, tcp_init, NULL); static void tcp_destroy(void *unused __unused) { - int n; #ifdef TCP_HHOOK int error; #endif - /* - * All our processes are gone, all our sockets should be cleaned - * up, which means, we should be past the tcp_discardcb() calls. - * Sleep to let all tcpcb timers really disappear and cleanup. - */ - for (;;) { - INP_INFO_WLOCK(&V_tcbinfo); - n = V_tcbinfo.ipi_count; - INP_INFO_WUNLOCK(&V_tcbinfo); - if (n == 0) - break; - pause("tcpdes", hz / 10); - } tcp_hc_destroy(); syncache_destroy(); in_pcbinfo_destroy(&V_tcbinfo);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411141941.4AEJfg77037292>