freebsd-skq/sbin/pfctl
pkelsey 2e5630c90a Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of
2^32 bps or greater to be used.  Prior to this, bandwidth parameters
would simply wrap at the 2^32 boundary.  The computations in the HFSC
scheduler and token bucket regulator have been modified to operate
correctly up to at least 100 Gbps.  No other algorithms have been
examined or modified for correct operation above 2^32 bps (some may
have existing computation resolution or overflow issues at rates below
that threshold).  pfctl(8) will now limit non-HFSC bandwidth
parameters to 2^32 - 1 before passing them to the kernel.

The extensions to the pf(4) ioctl interface have been made in a
backwards-compatible way by versioning affected data structures,
supporting all versions in the kernel, and implementing macros that
will cause existing code that consumes that interface to use version 0
without source modifications.  If version 0 consumers of the interface
are used against a new kernel that has had bandwidth parameters of
2^32 or greater configured by updated tools, such bandwidth parameters
will be reported as 2^32 - 1 bps by those old consumers.

All in-tree consumers of the pf(4) interface have been updated.  To
update out-of-tree consumers to the latest version of the interface,
define PFIOC_USE_LATEST ahead of any includes and use the code of
pfctl(8) as a guide for the ioctls of interest.

PR:	211730
Reviewed by:	jmallett, kp, loos
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	RG Nets
Differential Revision:	https://reviews.freebsd.org/D16782
2018-08-22 19:38:48 +00:00
..
tests Convert bsd.files.mk to support DIRS and simplify by only having one install 2018-07-26 17:05:33 +00:00
Makefile Move pf.os to sbin/pfctl/ 2018-08-11 13:58:26 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
parse.y Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pf_print_state.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pf.os Move pf.os to sbin/pfctl/ 2018-08-11 13:58:26 +00:00
pfctl_altq.c Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pfctl_optimize.c pfctl(8): Fix two wrong conditions. 2018-01-27 22:57:01 +00:00
pfctl_osfp.c pfctl: Make most global variables static. 2016-08-04 19:24:44 +00:00
pfctl_parser.c pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl_parser.h Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00: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 various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl_table.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl.8 pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl.c Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pfctl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00