From nobody Fri Nov 08 14:25:48 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 4XlLp46GwNz5cJyf; Fri, 08 Nov 2024 14:25:48 +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 4XlLp45llmz4bw9; Fri, 8 Nov 2024 14:25:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731075948; 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=aU5WzxBwiojeDbiwtYDdyphcgfnD5xu7jvgDV7xsfWc=; b=m0hu35HqblumxqA7cndqgRpYDIjWJRRIbQjznda90Ln6lXHcL2neshOsYypQwYR/ONR9IP ZmdqK8vbrOH0UEiR+Ecj0woBRgdUc9NJNMhFFROSHGUQIolk1juui7i/q5+jXRtC98JX4C xtUhCT7DAVXb4202vOopoTJ3iuPwXGA11oogMU6nW7ITLAOumT3CcIR0QrrPRuoplX2lAs vRjQWjb222Jw41umgA+6KqmiaTsqluiNwSMxDLOYLyNsHRMETexpLYhjzBGOwrkygyqqcN hDOyezyacQ+fOrExqFdfjriVCkeANqi2JtJqMK12QFoWtZfatRR3F7EECnD6Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731075948; 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=aU5WzxBwiojeDbiwtYDdyphcgfnD5xu7jvgDV7xsfWc=; b=uTfuLTc/mZK1gaJrHFb2C6paR21tfngQvJhVcgEDL3ukWQ13rfSGjmAegO02D5lsZObFqV PBn9JuruCllRLTXzoAfoTIPpGgrEfdPrOdoBjPrNC/EmNcJgUjIZHHaJCq6gB9AXhXU/52 HDOaw2xcyj1N/tWtDXBC1crfRhSZrrHfIVI2mDR71ecVC7G4qAyQyXmoo+2ytd3ZP/D4gG QCf3Gf1LovCgx19N3pF1mkIb6/wK2NAerpfO5WFlo+MhTHi2hMeQi8wdc0bnAB/+BDqF7k Dy15n2lZd9an8QH5VsCFmXZQUDZ2AACjNPhArwjTscN0fj0mCGLRE4lBaifYPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731075948; a=rsa-sha256; cv=none; b=J+OT+aQE9Kp+rilz/JqNrjb7TKXhxYYc3ja6vmCnhlN53FtUv4eSva22kpWZIFLfB4zUIw Fi1a6WL43Jzz0Vf51YNoEtkgru041ohuXhDsXW3VXULWsGHfMccZSjzEsPJ2164KFOtrdy uDYVFAviCn/bt/PUoGSyqFdZRpgeYq86CNLUtwqONrisw+xC/EwTUHammrwvO1+IujYxmD UQvc4Xh97mTYqjBXbBExt/BVNMFNqo0SBcmddtQ/PHsaAW2P9lJq8bD07EhGEJ03IPNFQ5 0Kn3j8lEKByABsUiUtInjXjmyHs288EH+OJnwdlrvCLz+M3JJXHAqnquhlC9/Q== 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 4XlLp45KTqzYR8; Fri, 8 Nov 2024 14:25:48 +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 4A8EPm2r005810; Fri, 8 Nov 2024 14:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A8EPmmD005807; Fri, 8 Nov 2024 14:25:48 GMT (envelope-from git) Date: Fri, 8 Nov 2024 14:25:48 GMT Message-Id: <202411081425.4A8EPmmD005807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 21d7ac8c79a3 - main - inpcb: Remove some unused parameters in internal hash lookup functions 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab commit 21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab Author: Mark Johnston AuthorDate: 2024-11-08 14:25:19 +0000 Commit: Mark Johnston CommitDate: 2024-11-08 14:25:19 +0000 inpcb: Remove some unused parameters in internal hash lookup functions in_pcblookup_hash_wild_* looks up unconnected inpcbs, so there is no point in passing the foreign address and port, and indeed those parameters are not used. So, remove them. No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D47385 --- sys/netinet/in_pcb.c | 17 ++++++++--------- sys/netinet6/in6_pcb.c | 14 ++++++-------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 6ea197cf68d8..769724fd5063 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2179,9 +2179,8 @@ in_pcblookup_wild_match(const struct inpcb *inp, struct in_addr laddr, #define INP_LOOKUP_AGAIN ((struct inpcb *)(uintptr_t)-1) static struct inpcb * -in_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, - u_short fport, struct in_addr laddr, u_short lport, - const inp_lookup_t lockflags) +in_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, struct in_addr laddr, + u_short lport, const inp_lookup_t lockflags) { struct inpcbhead *head; struct inpcb *inp; @@ -2217,8 +2216,8 @@ in_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, } static struct inpcb * -in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, - u_short fport, struct in_addr laddr, u_short lport) +in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr laddr, + u_short lport) { struct inpcbhead *head; struct inpcb *inp, *local_wild, *local_exact, *jail_wild; @@ -2319,8 +2318,8 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, inp = in_pcblookup_lbgroup(pcbinfo, &faddr, fport, &laddr, lport, numa_domain); if (inp == NULL) { - inp = in_pcblookup_hash_wild_locked(pcbinfo, faddr, - fport, laddr, lport); + inp = in_pcblookup_hash_wild_locked(pcbinfo, laddr, + lport); } } @@ -2402,8 +2401,8 @@ in_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, } inp = INP_LOOKUP_AGAIN; } else { - inp = in_pcblookup_hash_wild_smr(pcbinfo, faddr, fport, - laddr, lport, lockflags); + inp = in_pcblookup_hash_wild_smr(pcbinfo, laddr, lport, + lockflags); } if (inp == INP_LOOKUP_AGAIN) { return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 501434f2fac6..49a430ea6d01 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -997,8 +997,7 @@ in6_pcblookup_wild_match(const struct inpcb *inp, const struct in6_addr *laddr, static struct inpcb * in6_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, - const struct in6_addr *faddr, u_short fport, const struct in6_addr *laddr, - u_short lport, const inp_lookup_t lockflags) + const struct in6_addr *laddr, u_short lport, const inp_lookup_t lockflags) { struct inpcbhead *head; struct inpcb *inp; @@ -1035,8 +1034,7 @@ in6_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, static struct inpcb * in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, - const struct in6_addr *faddr, u_short fport, const struct in6_addr *laddr, - u_short lport) + const struct in6_addr *laddr, u_short lport) { struct inpcbhead *head; struct inpcb *inp, *jail_wild, *local_exact, *local_wild; @@ -1118,8 +1116,8 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, inp = in6_pcblookup_lbgroup(pcbinfo, faddr, fport, laddr, lport, numa_domain); if (inp == NULL) { - inp = in6_pcblookup_hash_wild_locked(pcbinfo, faddr, - fport, laddr, lport); + inp = in6_pcblookup_hash_wild_locked(pcbinfo, + laddr, lport); } } return (inp); @@ -1195,8 +1193,8 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, } inp = INP_LOOKUP_AGAIN; } else { - inp = in6_pcblookup_hash_wild_smr(pcbinfo, faddr, fport, - laddr, lport, lockflags); + inp = in6_pcblookup_hash_wild_smr(pcbinfo, laddr, lport, + lockflags); } if (inp == INP_LOOKUP_AGAIN) { return (in6_pcblookup_hash(pcbinfo, faddr, fport, laddr,