]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pf: atomically increment state ids
authorKristof Provost <kp@FreeBSD.org>
Fri, 7 Oct 2022 17:17:06 +0000 (19:17 +0200)
committerKristof Provost <kp@FreeBSD.org>
Sat, 8 Oct 2022 16:27:29 +0000 (18:27 +0200)
commit133935d26f20c0b9c433da9a2b32bcbe562bc2c5
treed216ea3b3c2fde3f0457e5492fcc02f76b03250b
parent5b966d7871aa14fd6c7656a9be16af3f23c6e17d
pf: atomically increment state ids

Rather than using a per-cpu state counter, and adding in the CPU id we
can atomically increment the number.
This has the advantage of removing the assumption that the CPU ID fits
in 8 bits.

Event: Aberdeen Hackathon 2022
Reviewed by: mjg
Differential Revision: https://reviews.freebsd.org/D36915
sys/net/pfvar.h
sys/netpfil/pf/pf.c
sys/netpfil/pf/pf_ioctl.c