Page MenuHomeFreeBSD

Clamp porthash_max to IPPORT_MAX.
ClosedPublic

Authored by markj on Nov 1 2018, 3:31 PM.
Tags
None
Referenced Files
F132927310: D17803.id51610.diff
Tue, Oct 21, 6:12 AM
F132927297: D17803.id49885.diff
Tue, Oct 21, 6:11 AM
F132927295: D17803.id51583.diff
Tue, Oct 21, 6:11 AM
F132927292: D17803.id.diff
Tue, Oct 21, 6:11 AM
F132915412: D17803.id51583.diff
Tue, Oct 21, 3:52 AM
Unknown Object (File)
Mon, Oct 20, 7:32 PM
Unknown Object (File)
Sat, Oct 11, 5:05 PM
Unknown Object (File)
Sep 20 2025, 3:41 AM
Subscribers

Details

Summary

The port hash function is just (lport & mask), so it makes no sense to
permit more than IPPORT_MAX hash table entries. On larger-memory
systems this just ends up wasting memory.

Also change the lbgroup hash table size to porthash_max, since it uses
the lport as a hash.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21358
Build 20685: arc lint + arc unit

Event Timeline

  • Fix an off-by-one.
  • Retire INP_PCBLBGROUP_PORTHASH. It's identical to INP_PCBPORTHASH, and because we now size the hash tables accurately, it would be nice to consistently use the same port hash everywhere.
This revision is now accepted and ready to land.Dec 4 2018, 10:08 PM
This revision was automatically updated to reflect the committed changes.