Page MenuHomeFreeBSD

pf: Use a macro to get the hash row in pf_find_state_byid()
ClosedPublic

Authored by markj on Mar 26 2025, 12:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 8, 4:49 PM
Unknown Object (File)
Mon, Aug 18, 9:38 PM
Unknown Object (File)
Aug 15 2025, 8:46 PM
Unknown Object (File)
Aug 7 2025, 1:54 PM
Unknown Object (File)
Aug 4 2025, 12:21 PM
Unknown Object (File)
Aug 1 2025, 5:59 AM
Unknown Object (File)
Jun 26 2025, 3:51 PM
Unknown Object (File)
Jun 22 2025, 9:41 AM

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63147
Build 60031: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 26 2025, 12:49 PM

I personally would prefer something without underscore prefix. The latter usually means something internal and not supposed to be used. But both macro working on ID and macro working on state definitely have the same level of visibility and usage - are supposed to be used only in pf(4) internally.

I can suggest two options:

PF_IDHASHID(id)
PF_IDHASH(state)

or

PF_IDHASH(id)
PF_STHASH(state)

More options are also possible.

Use a different name for the ID hash macro.

This revision now requires review to proceed.Mar 27 2025, 8:32 AM
This revision is now accepted and ready to land.Mar 27 2025, 8:47 AM
https://reviews.freebsd.org/D49518