Given that PF_RULES_LOCK is a mostly read lock, I replaced the rwlock with rmlock.
This change improves packet processing rate in high pps environments.
While here, I am also eliminating all appearances of "sys/rwlock.h" includes since it is not used anymore.
Details
Details
- Reviewers
kp - Commits
- rS334375: pf: Replace rwlock on PF_RULES_LOCK with rmlock
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 16720 Build 16613: arc lint + arc unit
Event Timeline
Comment Actions
Looks good at first glance.
I like the move of the sys/rmlock.h include into pfvar.h, so the header becomes more self-contained (i.e. you don't need extra includes to make your include of pfvar.h work). I'm running test builds for that, because I thought it broke when I tried. Perhaps I messed something else up though.
For others and for context: Olivier has tested this change and saw a 65% increase in packets per second through pf. We really, really want this change.
Comment Actions
Changes in pfvar.h and removal of rwlock.h includes broke the build (noted by @kristof). This updated patch unbreaks the build.