From nobody Thu Nov 14 19:41:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xq9Wq10cXz5d497; Thu, 14 Nov 2024 19:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq9Wq068Cz41H4; Thu, 14 Nov 2024 19:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d0QmqXFa+NYc2ouUcd8ZqeoMbXpAyOgDtpCsHmRpBY=; b=s7b/i51i4V7VNcgcsRQkPyVcUYInPM/HUVmgLcoAtBi1TOls/MTKETpkSJkFtQrnem9ncH VS56OZpuEKBCVzvuOB8prPRMInRGLwHyV2dUE+8t90wJUoVFSI6d3qf2NV66o220dStDIw e9ZqWokmwBz1iUDGaSbrB7hScDYPb22VaXLOwL8IwhL10U4Qn53s3cf60ZJpGX/h/QMWW7 vt/hVJ0cRamNuOIzXGdzMlynxx3Eg/0InAC2TG191/N8K4rTg1AjU0r4aIwvp5tdRcSfCt oGZZI70wsvGSBCvCOpUj6AemBvmJ0RhREq4XqDUotodILA8NKezrFRYetqLI6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731613303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2d0QmqXFa+NYc2ouUcd8ZqeoMbXpAyOgDtpCsHmRpBY=; b=jr2/4VhWDFWcFiEMVHbLKBfEm64Jc0p8gqjMCgwOzCfbKcaeKX6vs1PK3FWcY/u0nyu5KT bMJn8jNKGjcd16dqdXVYEKo+ucj3oZHqvcXaLpM7Mf0WM2rNOe3OSkHUEQyr3eUBvqVpEH OP7YYbURLIBHjd+7DorrCcPSOolyf7tfjyHXDg6TVYJHV2qtgU8lHBmS4zuWBA88rfU/E8 Hp0GEkN82fX92RN0+gBJtxdHq5Oj9hmA4JO+bvcH3f13joL2P1qNk5PEKEa+MpUtJZm0Lh C+Va2cuBdtsI5oythpAIFWxza49SU5NFoy5MwOYPNszVwrHp5L1lGLORqnZUvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731613303; a=rsa-sha256; cv=none; b=g4NUJTBBcwC4QqS7zqTeZMpLtmsMLfko3PMoXRjEwylL83A6kjtb+SUw8/CzEz03xZC+GK Ou9GMXU1J+2RI8VCVz96UAGtKmtLbOpg45Vpkr/Qa0abuBN9gDDVYZ4NRa9viDMJclIoMG UdBpU96SqqHvCpdbY+AJBRr0U7HTd/f9RLuEvpYX1iznPOOewzftJtrq9xD3Z8CeaURTIG x5sVRqcUmk1AYgytzs0UX6WsON0/z1276U0R+OSzeBVE9Kc4eifpBEQ2QRoQ+lvHgyDXNK 6L5gxpJ91cxbIN6CeZ3gUtTzkcrye7CdpjdnM+EMUkvwwOC/ngPPmhjrXb8kHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xq9Wp6psvzsPX; Thu, 14 Nov 2024 19:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEJfgMR037295; Thu, 14 Nov 2024 19:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEJfg77037292; Thu, 14 Nov 2024 19:41:42 GMT (envelope-from git) Date: Thu, 14 Nov 2024 19:41:42 GMT Message-Id: <202411141941.4AEJfg77037292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fb7c1ac5ac49 - main - tcp: remove the looping on pcb count in tcp_destroy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 commit fb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 Author: Gleb Smirnoff AuthorDate: 2024-11-14 19:39:12 +0000 Commit: Gleb Smirnoff 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 #include #include -#include #include #include #include @@ -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);