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

(cherry picked from commit 21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab)
This commit is contained in:
Mark Johnston 2024-11-08 14:25:19 +00:00 committed by Franco Fichtner
parent 42b36112c0
commit 7e198d2852
2 changed files with 14 additions and 17 deletions

View File

@ -2224,9 +2224,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;
@ -2262,8 +2261,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;
@ -2364,8 +2363,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);
}
}
@ -2447,8 +2446,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,

View File

@ -1031,8 +1031,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;
@ -1069,8 +1068,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;
@ -1152,8 +1150,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);
@ -1229,8 +1227,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,