git: 21d7ac8c79a3 - main - inpcb: Remove some unused parameters in internal hash lookup functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Nov 2024 14:25:48 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab commit 21d7ac8c79a34cf3b7205d0c32014ee39f1f28ab Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-11-08 14:25:19 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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,