From nobody Tue Aug 16 19:38:42 2022 X-Original-To: dev-commits-src-main@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 4M6hKG2NgNz4ZGZj; Tue, 16 Aug 2022 19:38:42 +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 4M6hKG1tWFz3TwD; Tue, 16 Aug 2022 19:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660678722; 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=qhPvATNZWjjD95oef0pjJSvtHHXZhA0zldyZxqpTc6s=; b=yETqXBigMSW4jmP8N79Bz6y7VvYcwW4kRUaOVmoQpeXfl3szjBupggy/bineyi8UhCdzgw AayxMP5RAE5mfOiRnpGKo7EyPuhJ+66DyLMwiF5B34mAEUQkAdkN9daWT5tbZJWqbAsiiM +NI6QpxiQuZwCnG2fOrsb0fuB/i07xCZJrR6lW+ssMYsRNxZhlAwTYl7jnWclgNGbu4zql ADvmX9T9Rfi+9MMA4ABlbQdpWUqbYo08A9IamthI6may0WFJO0roPv9HmJ4UY1x6mYKXBs QAFHvHF4FgsI451xKaCdBEX/b8U6WQSrLw1/pxhUXZi0KphQIZ2UOcc/bwJVaw== 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 4M6hKG0wgWzLtK; Tue, 16 Aug 2022 19:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27GJcg3W029701; Tue, 16 Aug 2022 19:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GJcgHr029700; Tue, 16 Aug 2022 19:38:42 GMT (envelope-from git) Date: Tue, 16 Aug 2022 19:38:42 GMT Message-Id: <202208161938.27GJcgHr029700@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: 01f11ee1c543 - main - sdp: garbage collect sdp_ctlinput List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 01f11ee1c543763b2864deb5e4592f441da2e8da Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660678722; 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=qhPvATNZWjjD95oef0pjJSvtHHXZhA0zldyZxqpTc6s=; b=mrXDcZqwv3LolVY/RqEHWL7MooxgduW7RNMPGvPqdXEm7Rs6n7X1bnDSWPEZbtaxnQZmpn HHLOw3IKeOaXmUJfTyHgo5WBEr1+ceNaBsx32mH4IG5aN/6PMl1uef9WvhYTSvKLLyRnBe wHsCDVX8Eo6qJiv+WerU9tYBui2DDsYrBNAXBpG9oBQ2I/kQmt3A+7CFoh3M81GT2F8tKG xYRtsyLND6OttnxOUvq5MPBTROuqt2lQvzjECMO3dmc5fib+EafFeiSxjXPqlj0dIbLL7a mirVCoSfqzfOptYREznayy42Vt0jq27TBGsUemo6qik2OBwOqH4njnEcHccajQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660678722; a=rsa-sha256; cv=none; b=c1/TPtv2GIceDiyfS+9CdmgXTTt1Z/cN35O1b3iMtYLlqODu+676snI/GpdHDPThiHs7XV zYz/oCHK/5EUnWd8wufJXHBAXq6M+HnyNm4iyY1gn3BDaL60is0IXkfSlGeb7DZgoXP0aG ITxYlg/OviG1djr4OV6a4FRqefTlW8ICLM9+RGfdVAfYM9bQTULfz4JFRF1fY7e4gVfStC SyOfASczU+MZ/7Hrg/8EAtzsETeCa+lsx5bP5Kmbb5i9LgEr4aSUmzKDVONerrN3+j/ooC Q+LVxLWkFTqrg1Hq5npUv8Qx1EeqK839O3qFlslMRWZxkODlPhBgY9jxPAMu1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=01f11ee1c543763b2864deb5e4592f441da2e8da commit 01f11ee1c543763b2864deb5e4592f441da2e8da Author: Gleb Smirnoff AuthorDate: 2022-08-16 19:38:15 +0000 Commit: Gleb Smirnoff CommitDate: 2022-08-16 19:38:15 +0000 sdp: garbage collect sdp_ctlinput The pr_ctlinput method was a feature of IPv4/IPv6 with exception of pfctlinput(), which broadcasted a call to pr_ctlinput on all protocols ever registered statically or with pf_proto_register(). Now that this broadcast call is gone, the only protocols that get their pr_ctlinput ever called are those that have registered itselves with ipproto_register() or ip6proto_register(). It is entirely possible that code deleted now was dead code from very beginning. Just a copy-paste from TCP. Reviewed by: rstone Differential revision: https://reviews.freebsd.org/D36208 --- sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c | 34 -------------------------- 1 file changed, 34 deletions(-) diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c index 8382854e24e2..b5de5ed11b00 100644 --- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c @@ -241,26 +241,6 @@ sdp_getpeeraddr(struct socket *so, struct sockaddr **nam) return 0; } -static void -sdp_pcbnotifyall(struct in_addr faddr, int errno, - struct sdp_sock *(*notify)(struct sdp_sock *, int)) -{ - struct sdp_sock *ssk, *ssk_temp; - - SDP_LIST_WLOCK(); - LIST_FOREACH_SAFE(ssk, &sdp_list, list, ssk_temp) { - SDP_WLOCK(ssk); - if (ssk->faddr != faddr.s_addr || ssk->socket == NULL) { - SDP_WUNLOCK(ssk); - continue; - } - if ((ssk->flags & SDP_DESTROY) == 0) - if ((*notify)(ssk, errno)) - SDP_WUNLOCK(ssk); - } - SDP_LIST_WUNLOCK(); -} - #if 0 static void sdp_apply_all(void (*func)(struct sdp_sock *, void *), void *arg) @@ -1563,18 +1543,6 @@ sdp_notify(struct sdp_sock *ssk, int error) return sdp_drop(ssk, error); } -static void -sdp_ctlinput(int cmd, struct sockaddr *sa, void *vip) -{ - struct in_addr faddr; - - faddr = ((struct sockaddr_in *)sa)->sin_addr; - if (sa->sa_family != AF_INET || faddr.s_addr == INADDR_ANY) - return; - - sdp_pcbnotifyall(faddr, inetctlerrmap[cmd], sdp_notify); -} - static void sdp_keepalive_timeout(void *data) { @@ -1935,7 +1903,6 @@ struct protosw sdpsw[] = { .pr_domain = &sdpdomain, .pr_protocol = IPPROTO_IP, .pr_flags = PR_CONNREQUIRED|PR_IMPLOPCL|PR_WANTRCVD, - .pr_ctlinput = sdp_ctlinput, .pr_ctloutput = sdp_ctloutput, .pr_usrreqs = &sdp_usrreqs }, @@ -1944,7 +1911,6 @@ struct protosw sdpsw[] = { .pr_domain = &sdpdomain, .pr_protocol = IPPROTO_TCP, .pr_flags = PR_CONNREQUIRED|PR_IMPLOPCL|PR_WANTRCVD, - .pr_ctlinput = sdp_ctlinput, .pr_ctloutput = sdp_ctloutput, .pr_usrreqs = &sdp_usrreqs },