From nobody Thu May 30 19:41:12 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 4VqxSm2pGkz5LHPX; Thu, 30 May 2024 19:41:12 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VqxSm2K5gz4K97; Thu, 30 May 2024 19:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717098072; 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=0j9WBxrtLcnYZ0jnots//2/f96+hZasQhL+6EHxnldY=; b=kez023O2nrj9QMWZS+6LXeN04o93DQxCm4LIDUshHGkt93PeCaDJmrVy/DglQ3/IujKOBN c5h9jw9OSKPDbW+mUDlNMtdgFD8zHo6+mqC71DbeHUTq624fa7+cZLLXPXlsrBOeUTgglg 0GOjoM4fR/0WRxY8jxdTGSl9fBqiLMcz9Y1Cjg67aysCTHqjNOsi+yEtQ5MtEnqxwNvfOH Yaiu3J0y7PDmDLqY7MMi8vs5740aRAMrgD1vCOajqGEZKK3P2qZms19gLLPkYXVZeZyw0P J5brO0JtY7U3X2UgzycVKrD/M6WWIBdLHsZKIMpSxoKiHOrotSCmbptrkxfqqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717098072; a=rsa-sha256; cv=none; b=jW5Uo3lNxBeesT5x59Tw1wl0ypHql/lG2lxBQaCI/pYXY/HbronGZjISl7iZQ26IW8kP4/ 1SAcmkvqVzAwwaL+V9wEPr6sAx4PK7Gz8V++YWGp5io4jfAwXf9T6reV+O3LvJsdLkWpKq Ywkr0mEYettxxrOZuGe3irBMAdIfeuaIwtd5Sc8V3TqgwLe5F81BiogtytDjMaIV7fPMF1 C72sCB4lNAVAgX02DC7metbTavhD71vDOU0EtOH2SuAy4Bpg7bRfYMVseqidI/Elv5IZm8 ourPqO6jL9vKkYEJ7/HSfj0D9f3pUVx8e2BleWTlC+BjztP0baH1TV338YjRDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717098072; 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=0j9WBxrtLcnYZ0jnots//2/f96+hZasQhL+6EHxnldY=; b=OuoZlIrpLxGTjp4+oSLbu+p621k4U52fludm0DSAu485S3T+yWgCdSkXAeZy2zRfsmz8+j KF0jq5Dhnp8JKxr2qvUg/ZumH426XDoU8ZObgZPxA9xf383XmJ17pPvuoOb0Y51etBoUiM i+Yn9G28a2Hsi4QUpmxCImiaZjMzXZtz3PMGVBvbH6HWTlMo6nA2VbzkWTfPEltH4Zkgji CY2BOSJfAgY1d4Pz2YuLSWyKf5P0Xd0XJFznkLYS2N6T7OtZXToo6m2YFP+ayHQKZwmURs DRUR4ygIRGKV+Z0lvi4giD3K9A/rfpD9BvXl3784dB/rddRo+HPzVnwqev65DA== 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 4VqxSm1wLFzsqn; Thu, 30 May 2024 19:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44UJfCZA049222; Thu, 30 May 2024 19:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44UJfCgK049219; Thu, 30 May 2024 19:41:12 GMT (envelope-from git) Date: Thu, 30 May 2024 19:41:12 GMT Message-Id: <202405301941.44UJfCgK049219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e7381521aa75 - main - tcp: remove unused code in tcp_usr_attach 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7381521aa755682f42e7b2d1a435ce7768aa708 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e7381521aa755682f42e7b2d1a435ce7768aa708 commit e7381521aa755682f42e7b2d1a435ce7768aa708 Author: Michael Tuexen AuthorDate: 2024-05-30 19:23:45 +0000 Commit: Michael Tuexen CommitDate: 2024-05-30 19:23:45 +0000 tcp: remove unused code in tcp_usr_attach pr_attach is only called on a socket (so) with so->so_listen != NULL via sonewconn. However, sonewconn is not called from the TCP code. The listening sockets are handled in tcp_syncache.c without using sonewconn. Therefore, the code removed is never executed. No functional change intended. Reviewed by: rrs, peter.lei_ieee.org MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45412 --- sys/netinet/tcp_usrreq.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 9e0a702a6c0f..f768f42114d4 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -179,12 +179,6 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) goto out; } tp->t_state = TCPS_CLOSED; - /* Can we inherit anything from the listener? */ - if ((so->so_listen != NULL) && - (so->so_listen->so_pcb != NULL) && - (tp->t_fb->tfb_inherit != NULL)) { - (*tp->t_fb->tfb_inherit)(tp, sotoinpcb(so->so_listen)); - } tcp_bblog_pru(tp, PRU_ATTACH, error); INP_WUNLOCK(inp); TCPSTATES_INC(TCPS_CLOSED);