]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libpfctl: migrate to DIOCGETSTATESV2
authorKristof Provost <kp@FreeBSD.org>
Tue, 6 Jul 2021 11:05:19 +0000 (13:05 +0200)
committerKristof Provost <kp@FreeBSD.org>
Fri, 16 Jul 2021 08:04:14 +0000 (10:04 +0200)
commitfa3da0e87de7e9c654881aedd7cf04d417768d50
treeaed8836e1fd74b3d1f03fc3ccaeaf9bc3133a015
parente8b98712d70675e48c84f31a4f108cba803c3a6c
libpfctl: migrate to DIOCGETSTATESV2

Stop using the *NV version to retrieve states, as its performance is
unacceptably bad.

For 1,000,000 states the nvlist version needed ~100 seconds to retrieve
the states, the new version needs ~3 seconds.

Reviewed by: mjg
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31098

(cherry picked from commit be70c7a50d324dd56f3a0d37d8372e7855dd580b)
lib/libpfctl/libpfctl.c