diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-08-18 12:19:40 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-09-02 21:10:20 +0000 |
| commit | ddd39152743abc3cff05e7475c0ce48aa303956a (patch) | |
| tree | 439f828e5910d9c6fab5359172281c2d3722d6bd /sys/net/pfvar.h | |
| parent | d64ba46792e786aecbd9a3d5b0579e1e224a0433 (diff) | |
pf: Introduce M_PF type for pf(4) related memory allocations.
Currently used M_TEMP and M_IFADDR types are unreasonable for that purpose.
This dedicated statistics simplify the future pf(4) unlocking work by decreasing
search area of possible memory leaks.
ok bluhm sashan
FreeBSD note: The unlocking work has already been done in FreeBSD, but it's
still useful to have all pf malloc() allocations be accounted to pf, not the
generic 'temp' bucket.
Obtained from: OpenBSD, mvs <mvs@openbsd.org>, 062cda8b8d
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'sys/net/pfvar.h')
| -rw-r--r-- | sys/net/pfvar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 3761ddae814f..79855fa84359 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -326,6 +326,7 @@ pf_counter_u64_zero(struct pf_counter_u64 *pfcu64) _Static_assert(sizeof(time_t) == 4 || sizeof(time_t) == 8, "unexpected time_t size"); SYSCTL_DECL(_net_pf); +MALLOC_DECLARE(M_PF); MALLOC_DECLARE(M_PFHASH); MALLOC_DECLARE(M_PF_RULE_ITEM); |
