HomeFreeBSD

inpcb: Split in_pcblookup_hash_locked() and clean up a bit

Description

inpcb: Split in_pcblookup_hash_locked() and clean up a bit

Split the in_pcblookup_hash_locked() function into several independent
subroutine calls, each of which does some kind of hash table lookup.
This refactoring makes it easier to introduce variants of the lookup
algorithm that behave differently depending on whether they are
synchronized by SMR or the PCB database hash lock.

While here, do some related cleanup:

  • Remove an unused ifnet parameter from internal functions. Keep it in external functions so that it can be used in the future to derive a v6 scopeid.
  • Reorder the parameters to in_pcblookup_lbgroup() to be consistent with the other lookup functions.
  • Remove an always-true check from in_pcblookup_lbgroup(): we can assume that we're performing a wildcard match.

No functional change intended.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D38364

Details

Provenance
markjAuthored on Feb 9 2023, 8:59 PM
Reviewer
glebius
Differential Revision
D38364: inpcb: Split in_pcblookup_hash_locked() and clean up a bit
Parents
rGb265a2e0d764: vmm: Fix AP startup compatibility for old bhyve executables
Branches
Unknown
Tags
Unknown