freebsd-dev/sbin/pfctl
Mateusz Guzik 858937bea4 pfctl: cache getprotobynumber results
As for example pfctl -ss keeps calling it, it saves a lot of overhead
from elided parsing of /etc/nsswitch.conf and /etc/protocols.

Sample result when running a pre-nvlist binary with nfs root and dumping
7 mln states:
before: 24.817u 62.993s 1:28.52 99.1%
after:	8.064u 1.117s 0:18.87 48.5%

Idea by Jim Thompson

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-07-01 21:31:45 +00:00
..
tests pfctl tests: Test fairq configuration 2021-05-20 14:06:23 +02:00
Makefile pfctl: Move ioctl abstraction functions into libpfctl 2021-04-10 11:16:02 +02:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
parse.y pfctl: cache getprotobynumber results 2021-07-01 21:31:45 +00:00
pf_print_state.c pfctl: cache getprotobynumber results 2021-07-01 21:31:45 +00:00
pf_ruleset.c libpfctl: Switch to pfctl_rule 2021-04-10 11:16:02 +02:00
pf.os Move pf.os to sbin/pfctl/ 2018-08-11 13:58:26 +00:00
pfctl_altq.c pfctl: Fix crash on ALTQ configuration 2021-05-20 14:06:22 +02:00
pfctl_ioctl.h pfctl: Move ioctl abstraction functions into libpfctl 2021-04-10 11:16:02 +02:00
pfctl_optimize.c libpfctl: Switch to pfctl_rule 2021-04-10 11:16:02 +02:00
pfctl_osfp.c pfctl: Make most global variables static. 2016-08-04 19:24:44 +00:00
pfctl_parser.c pfctl: cache getprotobynumber results 2021-07-01 21:31:45 +00:00
pfctl_parser.h pf: Support killing 'matching' states 2021-05-07 22:13:31 +02:00
pfctl_qstats.c Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pfctl_radix.c pfctl: Warn users when they run into kernel limits 2019-12-14 02:03:47 +00:00
pfctl_table.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl.8 pf: Support killing 'matching' states 2021-05-07 22:13:31 +02:00
pfctl.c pfctl: cache getprotobynumber results 2021-07-01 21:31:45 +00:00
pfctl.h pfctl: cache getprotobynumber results 2021-07-01 21:31:45 +00:00