HomeFreeBSD

pf: use counter_rate() for rate checking

Description

pf: use counter_rate() for rate checking

This has the advantage of not requiring a lock. The current src node code runs
the rate check under a lock, so this won't immediately improve performance.
This prepares the way for future work, introducing packet rate matching on
rules, where the lack of lock will be important.

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D50797

Details

Provenance
kpAuthored on Jun 5 2025, 4:45 PM
Differential Revision
D50797: pf: use counter_rate() for rate checking
Parents
rG1cd5c35d136e: counter(9): rate limit periods may be more than 1 second
Branches
Unknown
Tags
Unknown