aboutsummaryrefslogtreecommitdiff
path: root/share/man/man4
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man4')
-rw-r--r--share/man/man4/Makefile9
-rw-r--r--share/man/man4/acpi_ged.464
-rw-r--r--share/man/man4/acpi_thermal.45
-rw-r--r--share/man/man4/altq.414
-rw-r--r--share/man/man4/bridge.49
-rw-r--r--share/man/man4/cc_cubic.43
-rw-r--r--share/man/man4/cc_dctcp.47
-rw-r--r--share/man/man4/cc_newreno.43
-rw-r--r--share/man/man4/ctl.42
-rw-r--r--share/man/man4/cxgbe.44
-rw-r--r--share/man/man4/cxgbev.43
-rw-r--r--share/man/man4/da.442
-rw-r--r--share/man/man4/dcons.42
-rw-r--r--share/man/man4/ddb.4196
-rw-r--r--share/man/man4/divert.439
-rw-r--r--share/man/man4/dtrace_kinst.489
-rw-r--r--share/man/man4/gdb.416
-rw-r--r--share/man/man4/genetlink.4147
-rw-r--r--share/man/man4/iichid.42
-rw-r--r--share/man/man4/inet.46
-rw-r--r--share/man/man4/ip.415
-rw-r--r--share/man/man4/ip6.42
-rw-r--r--share/man/man4/iwlwifi.42
-rw-r--r--share/man/man4/mod_cc.414
-rw-r--r--share/man/man4/mpr.46
-rw-r--r--share/man/man4/netdump.46
-rw-r--r--share/man/man4/netgdb.413
-rw-r--r--share/man/man4/netlink.4349
-rw-r--r--share/man/man4/pci.44
-rw-r--r--share/man/man4/re.45
-rw-r--r--share/man/man4/rtnetlink.4519
-rw-r--r--share/man/man4/run.42
-rw-r--r--share/man/man4/snp.412
-rw-r--r--share/man/man4/tcp.454
-rw-r--r--share/man/man4/tcp_bbr.45
-rw-r--r--share/man/man4/tcp_rack.4159
-rw-r--r--share/man/man4/ti.42
-rw-r--r--share/man/man4/vmd.47
-rw-r--r--share/man/man4/wg.4218
-rw-r--r--share/man/man4/xhci.439
40 files changed, 1877 insertions, 218 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 192bab4155a2..1201aa809568 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -15,6 +15,7 @@ MAN= aac.4 \
${_acpi_panasonic.4} \
${_acpi_rapidstart.4} \
${_acpi_sony.4} \
+ acpi_ged.4 \
acpi_thermal.4 \
acpi_battery.4 \
${_acpi_toshiba.4} \
@@ -167,6 +168,7 @@ MAN= aac.4 \
gdb.4 \
gem.4 \
genet.4 \
+ genetlink.4 \
geom.4 \
geom_linux_lvm.4 \
geom_map.4 \
@@ -284,6 +286,7 @@ MAN= aac.4 \
mac.4 \
mac_biba.4 \
mac_bsdextended.4 \
+ mac_ddb.4 \
mac_ifoff.4 \
mac_lomac.4 \
mac_mls.4 \
@@ -333,6 +336,7 @@ MAN= aac.4 \
netgdb.4 \
netgraph.4 \
netintro.4 \
+ netlink.4 \
netmap.4 \
${_nfe.4} \
${_nfsmb.4} \
@@ -466,6 +470,7 @@ MAN= aac.4 \
rl.4 \
rndtest.4 \
route.4 \
+ rtnetlink.4 \
rtsx.4 \
rtw88.4 \
rtw88fw.4 \
@@ -544,6 +549,7 @@ MAN= aac.4 \
targ.4 \
tcp.4 \
tcp_bbr.4 \
+ tcp_rack.4 \
tdfx.4 \
termios.4 \
textdump.4 \
@@ -582,6 +588,7 @@ MAN= aac.4 \
vtnet.4 \
watchdog.4 \
${_wbwd.4} \
+ wg.4 \
witness.4 \
wlan.4 \
wlan_acl.4 \
@@ -759,6 +766,7 @@ MLINKS+=vr.4 if_vr.4
MLINKS+=vte.4 if_vte.4
MLINKS+=vtnet.4 if_vtnet.4
MLINKS+=watchdog.4 SW_WATCHDOG.4
+MLINKS+=wg.4 if_wg.4
MLINKS+=${_wpi.4} ${_if_wpi.4}
MLINKS+=xl.4 if_xl.4
@@ -917,6 +925,7 @@ _ccd.4= ccd.4
_dtrace_provs= dtrace_audit.4 \
dtrace_io.4 \
dtrace_ip.4 \
+ dtrace_kinst.4 \
dtrace_lockstat.4 \
dtrace_proc.4 \
dtrace_sched.4 \
diff --git a/share/man/man4/acpi_ged.4 b/share/man/man4/acpi_ged.4
new file mode 100644
index 000000000000..dd62e172ae8d
--- /dev/null
+++ b/share/man/man4/acpi_ged.4
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2022 Takanori Watanabe
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 18, 2022
+.Dt ACPI_GED 4
+.Os
+.Sh NAME
+.Nm acpi_ged
+.Nd "ACPI Generic Event Device"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_ged"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_ged_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for generic events interface.
+This handles interrupts and evaluates the specific ACPI method.
+This may generate optionally ACPI notify for another device.
+.Sh SEE ALSO
+.Xr acpi 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 14.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Takanori Watanabe Aq Mt takawata@FreeBSD.org
diff --git a/share/man/man4/acpi_thermal.4 b/share/man/man4/acpi_thermal.4
index d1cf8ee60ef2..1b9395a24be3 100644
--- a/share/man/man4/acpi_thermal.4
+++ b/share/man/man4/acpi_thermal.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 17, 2007
+.Dd November 21, 2022
.Dt ACPI_THERMAL 4
.Os
.Sh NAME
@@ -84,6 +84,9 @@ Current temperature for this zone.
.It Va hw.acpi.thermal.tz%d._PSV
Temperature to start passive cooling by throttling down CPU, etc.
This value can be overridden by the user.
+.It Va hw.acpi.thermal.tz%d._CR3
+Temperature to start critical suspend to RAM (S3).
+This value can be overridden by the user.
.It Va hw.acpi.thermal.tz%d._HOT
Temperature to start critical suspend to disk (S4).
This value can be overridden by the user.
diff --git a/share/man/man4/altq.4 b/share/man/man4/altq.4
index 5e8989025cb3..a84152081ba4 100644
--- a/share/man/man4/altq.4
+++ b/share/man/man4/altq.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 26, 2021
+.Dd November 10, 2022
.Dt ALTQ 4
.Os
.Sh NAME
@@ -138,7 +138,6 @@ They have been applied to the following hardware drivers:
.Xr bge 4 ,
.Xr bxe 4 ,
.Xr cas 4 ,
-.Xr cxgbe 4 ,
.Xr dc 4 ,
.Xr em 4 ,
.Xr epair 4 ,
@@ -173,19 +172,14 @@ and
.Xr xl 4 .
.Pp
The
-.Xr tun 4
+.Xr tun 4 ,
+.Xr if_bridge 4 ,
+.Xr if_vlan 4 ,
and
.Xr ng_iface 4
pseudo drivers also do support
.Nm .
.Pp
-The
-.Xr vlan 4
-driver does not directly support
-.Nm ,
-but as packets (mbufs) are passed to the underlying interface, a queue
-can be defined for the underlying interface, and any packets directed
-to the queue will be processed at the interface level.
An example:
.Bd -literal -offset indent
altq on igb0 cbq queue { def aq }
diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4
index e193724928ca..e5313430b407 100644
--- a/share/man/man4/bridge.4
+++ b/share/man/man4/bridge.4
@@ -35,7 +35,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 17, 2021
+.Dd September 7, 2022
.Dt IF_BRIDGE 4
.Os
.Sh NAME
@@ -127,7 +127,9 @@ in
.Xr rc.conf 5 .
.Pp
The MTU of the first member interface to be added is used as the bridge MTU.
-All additional members are required to have exactly the same MTU value.
+All additional members will have their MTU changed to match.
+If the MTU of a bridge is changed after its creation, the MTU of all member
+interfaces is also changed to match.
.Pp
The TOE, TSO, TXCSUM and TXCSUM6 capabilities on all interfaces added to the
bridge are disabled if any of the interfaces do not support/enable them.
@@ -511,4 +513,5 @@ Rapid Spanning Tree Protocol (RSTP) support was added by
The
.Nm
driver currently supports only Ethernet and Ethernet-like (e.g., 802.11)
-network devices, with exactly the same interface MTU size as the bridge device.
+network devices, which can be configured with the same MTU size as the bridge
+device.
diff --git a/share/man/man4/cc_cubic.4 b/share/man/man4/cc_cubic.4
index 806d6aec2441..9ceaaa871777 100644
--- a/share/man/man4/cc_cubic.4
+++ b/share/man/man4/cc_cubic.4
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 13, 2021
+.Dd September 13, 2022
.Dt CC_CUBIC 4
.Os
.Sh NAME
@@ -39,6 +39,7 @@
.Sh DESCRIPTION
The CUBIC congestion control algorithm was designed to provide increased
throughput in fast and long-distance networks.
+The CUBIC congestion control algorithm is the default for TCP.
It attempts to maintain fairness when competing with legacy NewReno TCP in lower
speed scenarios where NewReno is able to operate adequately.
.Pp
diff --git a/share/man/man4/cc_dctcp.4 b/share/man/man4/cc_dctcp.4
index 8c23f2eaa134..c4c8eb7da623 100644
--- a/share/man/man4/cc_dctcp.4
+++ b/share/man/man4/cc_dctcp.4
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 13, 2021
+.Dd November 8, 2022
.Dt CC_DCTCP 4
.Os
.Sh NAME
@@ -91,6 +91,11 @@ gain of 1 / ( 2 ^
.It Va slowstart
A flag if the congestion window should be reduced by one half after slow start.
Valid settings 0 and 1, default 0.
+.It Va ect1
+Controls if a DCTCP session should use IP ECT(0) marking when sending out
+segments (default), or ECT(1) marking making use of L4S infrastructure.
+Changes to this setting will only affect new sessions, existing sessions will
+retain their previous marking value.
.El
.Sh SEE ALSO
.Xr cc_cdg 4 ,
diff --git a/share/man/man4/cc_newreno.4 b/share/man/man4/cc_newreno.4
index 76dd3b2559bb..0d0f0d000d38 100644
--- a/share/man/man4/cc_newreno.4
+++ b/share/man/man4/cc_newreno.4
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 13, 2021
+.Dd September 13, 2022
.Dt CC_NEWRENO 4
.Os
.Sh NAME
@@ -39,7 +39,6 @@
.Sh SYNOPSIS
.In netinet/cc/cc_newreno.h
.Sh DESCRIPTION
-The NewReno congestion control algorithm is the default for TCP.
Details about the algorithm can be found in RFC5681.
.Sh Socket Options
The
diff --git a/share/man/man4/ctl.4 b/share/man/man4/ctl.4
index e150d70665d2..18005ae3c7a0 100644
--- a/share/man/man4/ctl.4
+++ b/share/man/man4/ctl.4
@@ -201,7 +201,7 @@ Specifies the maximum number of LUNs we support, must be a power of 2.
The default value is 1024.
.It Va kern.cam.ctl.max_ports
Specifies the maximum number of ports we support, must be a power of 2.
-The default value is 256.
+The default value is 1024.
.El
.Sh SEE ALSO
.Xr cfiscsi 4 ,
diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4
index 5f959299d2ad..975ef5fb5f7d 100644
--- a/share/man/man4/cxgbe.4
+++ b/share/man/man4/cxgbe.4
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 10, 2021
+.Dd November 10, 2022
.Dt CXGBE 4
.Os
.Sh NAME
@@ -277,6 +277,7 @@ Controls the hardware response to congestion.
0 instructs the hardware to backpressure its pipeline on congestion.
This usually results in the port emitting PAUSE frames.
1 instructs the hardware to drop frames destined for congested queues.
+2 instructs the hardware to both backpressure the pipeline and drop frames.
.It Va hw.cxgbe.pause_settings
PAUSE frame settings.
Bit 0 is rx_pause, bit 1 is tx_pause, bit 2 is pause_autoneg.
@@ -397,7 +398,6 @@ If an issue is identified with this driver with a supported adapter,
email all the specific information related to the issue to
.Aq Mt support@chelsio.com .
.Sh SEE ALSO
-.Xr altq 4 ,
.Xr arp 4 ,
.Xr ccr 4 ,
.Xr cxgb 4 ,
diff --git a/share/man/man4/cxgbev.4 b/share/man/man4/cxgbev.4
index b2fcac6c632b..9f70bf9c46a6 100644
--- a/share/man/man4/cxgbev.4
+++ b/share/man/man4/cxgbev.4
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 9, 2017
+.Dd November 10, 2022
.Dt CXGBEV 4
.Os
.Sh NAME
@@ -290,7 +290,6 @@ If an issue is identified with this driver with a supported adapter,
email all the specific information related to the issue to
.Aq Mt support@chelsio.com .
.Sh SEE ALSO
-.Xr altq 4 ,
.Xr arp 4 ,
.Xr cxgbe 4 ,
.Xr netintro 4 ,
diff --git a/share/man/man4/da.4 b/share/man/man4/da.4
index ed820c637750..ce7f269b79c0 100644
--- a/share/man/man4/da.4
+++ b/share/man/man4/da.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 20, 2017
+.Dd September 10, 2022
.Dt DA 4
.Os
.Sh NAME
@@ -133,6 +133,29 @@ variables and
.Xr loader 8
tunables:
.Bl -tag -width 12
+.It Va kern.cam.da.default_timeout
+This variable determines how long the
+.Nm
+driver will wait before timing out an outstanding command.
+The units for this value are seconds, and the default is currently 60
+seconds.
+.It Va kern.cam.da.disable_wp_protection
+Disable detection of write-protected disks.
+Default is disabled.
+.Po
+detection of write-protected disks is enabled
+.Pc .
+.It Va kern.cam.da.enable_biospeedup
+Enable
+.Dv BIO_SPEEDUP
+processing.
+Default is enabled.
+.It Va kern.cam.da.enable_uma_ccbs
+Use UMA for CCBs.
+Default is enabled.
+.It Va kern.cam.da.poll_period
+Media polling period in seconds.
+Default is 3 seconds.
.It Va kern.cam.da.retry_count
This variable determines how many times the
.Nm
@@ -142,19 +165,20 @@ the
.Nm
driver dump routine.
This value currently defaults to 4.
-.It Va kern.cam.da.default_timeout
-This variable determines how long the
+.It Va kern.cam.da.send_ordered
+Send Ordered Tags.
+On shutdown, step through all the
.Nm
-driver will wait before timing out an outstanding command.
-The units for this value are seconds, and the default is currently 60
-seconds.
+peripheral drivers, and if the device is still open,
+sync the disk to physical media.
+Default is enabled.
.It Va kern.cam.sort_io_queue
-.It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue
+.It Va kern.cam.da . Ns Ar X Ns Va .sort_io_queue
These variables determine whether request queue should be sorted trying
to optimize head seeks.
Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is.
The default is sorting enabled for HDDs and disabled for SSDs.
-.It Va kern.cam.da. Ns Ar X Ns Va .delete_method
+.It Va kern.cam.da . Ns Ar X Ns Va .delete_method
This variable specifies method to handle BIO_DELETE requests:
.Bl -tag -width "ATA_TRIM"
.It ATA_TRIM
@@ -170,7 +194,7 @@ WRITE SAME(10) command without UNMAP flag,
.It DISABLE
disable BIO_DELETE support.
.El
-.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size
+.It Va kern.cam.da . Ns Ar X Ns Va .minimum_cmd_size
This variable determines what the minimum READ/WRITE CDB size is for a
given
.Nm
diff --git a/share/man/man4/dcons.4 b/share/man/man4/dcons.4
index d228ad5c16b9..2b8292695649 100644
--- a/share/man/man4/dcons.4
+++ b/share/man/man4/dcons.4
@@ -102,7 +102,7 @@ for more details.
If you want to use
.Nm
as a
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
port, add the following line into
.Xr loader.conf 5 :
.Bd -literal -offset indent
diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4
index d7b51b270877..7d5da91fc684 100644
--- a/share/man/man4/ddb.4
+++ b/share/man/man4/ddb.4
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 14, 2021
+.Dd November 10, 2022
.Dt DDB 4
.Os
.Sh NAME
@@ -58,7 +58,7 @@ representation, define:
.Ed
.Pp
To enable the
-.Xr gdb 1
+.Xr gdb 4
backend, so that remote debugging with
.Xr kgdb 1 Pq Pa ports/devel/gdb
is possible, include:
@@ -69,7 +69,7 @@ is possible, include:
The
.Nm
kernel debugger is an interactive debugger with a syntax inspired by
-.Xr gdb 1 .
+.Xr gdb 1 Pq Pa ports/devel/gdb .
If linked into the running kernel,
it can be invoked locally with the
.Ql debug
@@ -182,11 +182,8 @@ command line editing capabilities.
In addition to
the
.Nm emacs
-control keys, the usual
-.Tn ANSI
-arrow keys may be used to
-browse through the history buffer, and move the cursor within the
-current line.
+control keys, the usual ANSI arrow keys may be used to browse through the
+history buffer, and move the cursor within the current line.
.Sh COMMANDS
.Ss COMMON DEBUGGER COMMANDS
.Bl -tag -width indent -compact
@@ -246,8 +243,8 @@ The location is also displayed in hex at the beginning of each line.
.It Cm i
display as a disassembled instruction
.It Cm I
-display as an disassembled instruction with possible alternate formats depending on the
-machine.
+display as a disassembled instruction with possible alternate formats
+depending on the machine.
On i386, this selects the alternate format for the instruction decoding
(16 bits in a 32-bit code segment and vice versa).
.It Cm S
@@ -541,6 +538,14 @@ Switch the debugger to the thread with ID
if the argument is a decimal number, or address
.Ar addr ,
otherwise.
+.Pp
+.It Ic watchdog Op Ar exp
+Program the
+.Xr watchdog 4
+timer to fire in
+.Pf 2^ Ar exp
+seconds.
+If no argument is provided, the watchdog timer is disabled.
.El
.Ss SPECIALIZED HELPER COMMANDS
.Bl -tag -width indent -compact
@@ -548,11 +553,13 @@ otherwise.
.Ic findstack
.Ar addr
.Xc
-Prints the thread address for a thread kernel-mode stack of which contains the
-specified address.
-If the thread is not found, search the thread stack cache and prints the
-cached stack address.
-Otherwise, prints nothing.
+Prints the address of the thread whose kernel-mode stack contains
+.Ar addr ,
+if any.
+.Pp
+.It Ic show Cm active trace
+.It acttrace
+Show a stack trace for every thread running on a CPU.
.Pp
.It Ic show Cm all procs Ns Op Li / Ns Cm a
.It Ic ps Ns Op Li / Ns Cm a
@@ -607,6 +614,15 @@ addresses, and Resource IDs.
Dump data about APIC IDT vector mappings.
.\"
.Pp
+.It Ic show Cm badstacks
+Walk the
+.Xr witness 4
+graph and print any lock-order violations.
+This command is only available if
+.Xr witness 4
+is included in the kernel.
+.\"
+.Pp
.It Ic show Cm breaks
Show breakpoints set with the "break" command.
.\"
@@ -640,19 +656,18 @@ present at
.Ar addr .
.\"
.Pp
-.It Ic show Cm cbstat
-Show brief information about the TTY subsystem.
-.\"
-.Pp
-.It Ic show Cm cdev
-Without argument, show the list of all created cdev's, consisting of devfs
-node name and struct cdev address.
-When address of cdev is supplied, show some internal devfs state of the cdev.
+.It Ic show Cm cdev Op Ar addr
+Show the internal devfs state of the cdev structure located at
+.Ar addr .
+If no argument is provided, show the list of all created cdevs, consisting of
+the devfs node name and the
+.Vt struct cdev
+address.
.\"
.Pp
.It Ic show Cm conifhk
Lists hooks currently waiting for completion in
-run_interrupt_driven_config_hooks().
+.Fn run_interrupt_driven_config_hooks .
.\"
.Pp
.It Ic show Cm cpusets
@@ -729,6 +744,13 @@ present at
.Ar addr .
.\"
.Pp
+.It Ic show Cm iosched Ar addr
+Show information about the I/O scheduler
+.Vt struct cam_iosched_softc
+located at
+.Ar addr .
+.\"
+.Pp
.It Ic show Cm inodedeps Op Ar addr
Show brief information about each inodedep structure.
If
@@ -756,13 +778,20 @@ Dump the interrupt statistics.
Show interrupt lines and their respective kernel threads.
.\"
.Pp
-.It Ic show Cm jails
-Show the list of
-.Xr jail 8
-instances.
-In addition to what
-.Xr jls 8
-shows, also list kernel internal details.
+.It Ic show Cm ktr Ns Op Li / Ns Cm a Ns Cm v Ns Cm V
+Print the contents of the
+.Xr ktr 4
+trace buffer.
+The
+.Cm v
+modifier will request fully verbose output, causing the file, line number, and
+timestamp to be printed for each trace entry.
+The
+.Cm V
+modifier will request only the timestamps to be printed.
+The
+.Cm a
+modifier will request that the output be unpaginated.
.\"
.Pp
.It Ic show Cm lapic
@@ -773,24 +802,24 @@ Show information from the local APIC registers for this CPU.
Show lock structure.
The output format is as follows:
.Bl -tag -width "flags"
-.It Ic class:
+.It Ic class :
Class of the lock.
Possible types include
.Xr mutex 9 ,
.Xr rmlock 9 ,
.Xr rwlock 9 ,
.Xr sx 9 .
-.It Ic name:
+.It Ic name :
Name of the lock.
-.It Ic flags:
+.It Ic flags :
Flags passed to the lock initialization function.
.Em flags
values are lock class specific.
-.It Ic state:
+.It Ic state :
Current state of a lock.
.Em state
values are lock class specific.
-.It Ic owner:
+.It Ic owner :
Lock owner.
.El
.\"
@@ -870,11 +899,14 @@ It is useful if you got a kernel panic, attached a serial cable
to the machine and want to get the boot messages from before the
system hang.
.\"
-.It Ic show Cm mount
-Displays short info about all currently mounted file systems.
.Pp
-.It Ic show Cm mount Ar addr
-Displays details about the given mount point.
+.It Ic show Cm mount Op Ar addr
+Displays details about the mount point located at
+.Ar addr .
+If no
+.Ar addr
+is specified,
+displays short info about all currently mounted file systems.
.\"
.Pp
.It Ic show Cm object Ns Oo Li / Ns Cm f Oc Ar addr
@@ -932,16 +964,24 @@ Names of spin locks held.
Dump process groups present within the system.
.\"
.Pp
-.It Ic show Cm proc Op Ar addr
-If no
-.Op Ar addr
-is specified, print information about the current process.
-Otherwise, show information about the process at address
+.It Ic show Cm prison Op Ar addr
+Show the prison structure located at
.Ar addr .
+If no
+.Ar addr
+argument is specified, show information about all prisons in the system.
.\"
.Pp
-.It Ic show Cm procvm
-Show process virtual memory layout.
+.It Ic show Cm proc Op Ar addr
+Show information about the process structure located at address
+.Ar addr ,
+or the current process if no argument is specified.
+.\"
+.Pp
+.It Ic show Cm procvm Op Ar addr
+Show process virtual memory layout for the process located at
+.Ar addr ,
+or the current process if no argument is specified.
.\"
.Pp
.It Ic show Cm protosw Ar addr
@@ -994,36 +1034,26 @@ Now an alias for
.Ic show Cm lockchain .
.\"
.Pp
-.It Ic show Cm sleepq
-.It Ic show Cm sleepqueue
-Both commands provide the same functionality.
-They show sleepqueue
-.Vt struct sleepqueue
-structure.
-Sleepqueues are used within the
-.Fx
-kernel to implement sleepable
-synchronization primitives (thread holding a lock might sleep or
-be context switched), which at the time of writing are:
-.Xr condvar 9 ,
-.Xr sx 9
-and standard
-.Xr msleep 9
-interface.
+.It Ic show Cm sleepq Ar addr
+.It Ic show Cm sleepqueue Ar addr
+Show the
+.Xr sleepqueue 9
+structure located at
+.Ar addr .
.\"
.Pp
.It Ic show Cm sockbuf Ar addr
+Show the socket buffer
+.Va struct sockbuf
+located at
+.Ar addr .
+.\"
+.Pp
.It Ic show Cm socket Ar addr
-Those commands print
-.Vt struct sockbuf
-and
+Show the socket object
.Vt struct socket
-objects placed at
+located at
.Ar addr .
-Output consists of all values present in structures mentioned.
-For exact interpretation and more details, visit
-.Pa sys/socket.h
-header file.
.\"
.Pp
.It Ic show Cm sysregs
@@ -1141,11 +1171,8 @@ and none have zero ref counts.
.\"
.Pp
.It Ic show Cm vmopag
-This is supposed to show physical addresses consumed by a
-VM object.
-Currently, it is not possible to use this command when
-.Xr witness 4
-is compiled in the kernel.
+Walk the list of VM objects in the system, printing the indices and physical
+addresses of the VM pages belonging to each object.
.\"
.Pp
.It Ic show Cm vnet Ar addr
@@ -1155,11 +1182,11 @@ structure present at the address
.Ar addr .
.\"
.Pp
-.It Ic show Cm vnode Op Ar addr
+.It Ic show Cm vnode Ar addr
Prints vnode
.Vt struct vnode
structure lying at
-.Op Ar addr .
+.Ar addr .
For the exact interpretation of the output, look at the
.Pa sys/vnode.h
header file.
@@ -1187,10 +1214,14 @@ subsystem.
.El
.Ss OFFLINE DEBUGGING COMMANDS
.Bl -tag -width indent -compact
+.It Ic dump
+Initiate a kernel core dump to the device(s) configured by
+.Xr dumpon 8 .
+.Pp
.It Ic gdb
Switches to remote GDB mode.
In remote GDB mode, another machine is required that runs
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
using the remote debug feature, with a connection to the serial
console port on the target machine.
.Pp
@@ -1552,8 +1583,8 @@ CR TILDE CTRL-R causes an immediate reboot.
In all these sequences, CR represents Carriage Return and is usually
sent by pressing the Enter or Return key.
TILDE is the ASCII tilde character (~).
-CTRL-x is Control x, send by pressing the Control key, then x, then releasing both.
-and then releasing both.
+CTRL-x is Control x, sent by pressing the Control key, then x, then releasing
+both.
.Pp
The break-to-debugger behavior can be enabled by setting
.Xr sysctl 8
@@ -1598,10 +1629,11 @@ directory.
.Pa sys/vnode.h
.El
.Sh SEE ALSO
-.Xr gdb 1 ,
+.Xr gdb 1 Pq Pa ports/devel/gdb ,
.Xr kgdb 1 Pq Pa ports/devel/gdb ,
.Xr acpi 4 ,
.Xr CAM 4 ,
+.Xr gdb 4 ,
.Xr mac_ddb 4 ,
.Xr mac_test 4 ,
.Xr netgraph 4 ,
diff --git a/share/man/man4/divert.4 b/share/man/man4/divert.4
index d8296995ca97..18da54ee9fc9 100644
--- a/share/man/man4/divert.4
+++ b/share/man/man4/divert.4
@@ -1,6 +1,6 @@
.\" $FreeBSD$
.\"
-.Dd December 17, 2004
+.Dd August 30, 2022
.Dt DIVERT 4
.Os
.Sh NAME
@@ -11,7 +11,7 @@
.In sys/socket.h
.In netinet/in.h
.Ft int
-.Fn socket PF_INET SOCK_RAW IPPROTO_DIVERT
+.Fn socket PF_DIVERT SOCK_RAW 0
.Pp
To enable support for divert sockets, place the following lines in the
kernel configuration file:
@@ -30,24 +30,30 @@ ipfw_load="YES"
ipdivert_load="YES"
.Ed
.Sh DESCRIPTION
-Divert sockets are similar to raw IP sockets, except that they
-can be bound to a specific
+Divert sockets allow to intercept and re-inject packets flowing through
+the
+.Xr ipfw 4
+firewall.
+A divert socket can be bound to a specific
.Nm
port via the
.Xr bind 2
system call.
-The IP address in the bind is ignored; only the port
-number is significant.
+The sockaddr argument shall be sockaddr_in with sin_port set to the
+desired value.
+Note that the
+.Nm
+port has nothing to do with TCP/UDP ports.
+It is just a cookie number, that allows to differentiate between different
+divert points in the
+.Xr ipfw 4
+ruleset.
A divert socket bound to a divert port will receive all packets diverted
-to that port by some (here unspecified) kernel mechanism(s).
-Packets may also be written to a divert port, in which case they
-re-enter kernel IP packet processing.
+to that port by
+.Xr ipfw 4 .
+Packets may also be written to a divert port, in which case they re-enter
+firewall processing at the next rule.
.Pp
-Divert sockets are normally used in conjunction with
-.Fx Ns 's
-packet filtering implementation and the
-.Xr ipfw 8
-program.
By reading from and writing to a divert socket, matching packets
can be passed through an arbitrary ``filter'' as they travel through
the host machine, special routing tricks can be done, etc.
@@ -153,8 +159,9 @@ with the correct value.
Packets written as incoming and having incorrect checksums will be dropped.
Otherwise, all header fields are unchanged (and therefore in network order).
.Pp
-Binding to port numbers less than 1024 requires super-user access, as does
-creating a socket of type SOCK_RAW.
+Creating a
+.Nm
+socket requires super-user access.
.Sh ERRORS
Writing to a divert socket can return these errors, along with
the usual errors possible when writing raw packets:
diff --git a/share/man/man4/dtrace_kinst.4 b/share/man/man4/dtrace_kinst.4
new file mode 100644
index 000000000000..48253add6855
--- /dev/null
+++ b/share/man/man4/dtrace_kinst.4
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2022 Christos Margiolis <christos@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 01, 2022
+.Dt DTRACE_KINST 4
+.Os
+.Sh NAME
+.Nm dtrace_kinst
+.Nd a DTrace provider for tracing arbitrary instructions in a given kernel
+function.
+.Sh SYNOPSIS
+kinst::<function>:<instruction>
+.Sh DESCRIPTION
+.Pp
+The DTrace
+.Nm kinst
+provider allows the user to trace any instruction in a given kernel function.
+<function> corresponds to the function to be traced, and <instruction> is the
+offset to the specific instruction, and can be obtained from the function's
+disassembly using
+.Xr kgdb 1 .
+.Pp
+.Nm kinst
+creates probes on-demand, meaning it searches for and parses the function's
+instructions each time
+.Xr dtrace 1
+is run, and not at module load time. This is in contrast to FBT's load-time
+parsing, since
+.Nm kinst
+can potentially create thousands of probes for just a single function, instead
+of up to two (entry and return) in the case of FBT.
+.Sh EXAMPLES
+.Pp
+Find the offset to the third instruction in
+.Fn vm_fault
+and trace it:
+.Bd -literal -offset indent
+# kgdb
+(kgdb) disas /r vm_fault
+Dump of assembler code for function vm_fault:
+ 0xffffffff80876df0 <+0>: 55 push %rbp
+ 0xffffffff80876df1 <+1>: 48 89 e5 mov %rsp,%rbp
+ 0xffffffff80876df4 <+4>: 41 57 push %r15
+
+# dtrace -n 'kinst::vm_fault:4'
+.Ed
+.Pp
+Trace all instructions in
+.Fn amd64_syscall :
+.Bd -literal -offset indent
+# dtrace -n 'kinst::amd64_syscall:'
+.Ed
+.Sh IMPLEMENTATION NOTES
+The provider is currently implemented only for amd64.
+.Sh SEE ALSO
+.Xr dtrace 1 ,
+.Xr kgdb 1
+.Sh HISTORY
+The
+.Nm kinst
+provider first appeared in
+.Fx
+14.0.
+.Sh AUTHORS
+This manual page was written by
+.An Christos Margiolis Aq Mt christos@FreeBSD.org .
diff --git a/share/man/man4/gdb.4 b/share/man/man4/gdb.4
index de2f4d108048..47a1c9896843 100644
--- a/share/man/man4/gdb.4
+++ b/share/man/man4/gdb.4
@@ -37,7 +37,7 @@
The
.Nm
kernel debugger is a variation of
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
which understands some aspects of the
.Fx
kernel environment.
@@ -90,7 +90,7 @@ on,
In this mode, you need the
.Fl k
flag to indicate to
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
that the
.Dq "dump file"
.Pa /dev/mem
@@ -336,9 +336,9 @@ The remote system continues to run.
The user interface to
.Nm
is via
-.Xr gdb 1 ,
+.Xr gdb 1 Pq Pa ports/devel/gdb ,
so
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
commands also work.
This section discusses only the extensions for kernel debugging that get
installed in the kernel build directory.
@@ -387,7 +387,7 @@ are convenience commands which invoke
.Ss "The current process environment"
The following macros are convenience functions intended to make things easier
than the standard
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
commands.
.Bl -tag -width indent
.It Ic f0
@@ -467,7 +467,7 @@ Show some PCB contents of the process
.El
.Ss "Examining data structures"
You can use standard
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
commands to look at most data structures.
The macros in this section are
convenience functions which typically display the data in a more readable
@@ -568,7 +568,7 @@ It does nothing else except to print a warning
message to remind you to remove it again.
.El
.Sh SEE ALSO
-.Xr gdb 1 ,
+.Xr gdb 1 Pq Pa ports/devel/gdb ,
.Xr ps 1 ,
.Xr ddb 4 ,
.Xr firewire 4 ,
@@ -581,7 +581,7 @@ This man page was written by
.An Greg Lehey Aq Mt grog@FreeBSD.org .
.Sh BUGS
The
-.Xr gdb 1
+.Xr gdb 1 Pq Pa ports/devel/gdb
debugger
was never designed to debug kernels, and it is not a very good match.
Many problems exist.
diff --git a/share/man/man4/genetlink.4 b/share/man/man4/genetlink.4
new file mode 100644
index 000000000000..2c5b9b99f994
--- /dev/null
+++ b/share/man/man4/genetlink.4
@@ -0,0 +1,147 @@
+.\"
+.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 1, 2022
+.Dt GENETLINK 4
+.Os
+.Sh NAME
+.Nm genetlink
+.Nd Generic Netlink
+.Sh SYNOPSIS
+.In netlink/netlink.h
+.In netlink/netlink_generic.h
+.Ft int
+.Fn socket AF_NETLINK SOCK_DGRAM NETLINK_GENERIC
+.Sh DESCRIPTION
+The
+.Dv NETLINK_GENERIC
+is a "container" family, used for dynamic registration of other families
+belonging to the various subsystems.
+These subsystems provide a string family name during registration and
+receive a dynamically-allocated family id.
+Allocated family identifiers are then used by applications to get access to
+functions provided by that subsystem via netlink.
+There are standard methods for resolving string family names to family
+identifiers.
+A similar mechanism works for the notification groups provided by those
+families.
+.Pp
+All generic netlink families share a common header:
+.Bd -literal
+struct genlmsghdr {
+ uint8_t cmd; /* command within the family */
+ uint8_t version; /* ABI version for the cmd */
+ uint16_t reserved; /* reserved: set to 0 */
+};
+.Ed
+The family id is encoded in the
+.Dv nlmsg_type
+of the base netlink header.
+The
+.Va cmd
+field is the command identifier within the family.
+The
+.Va version
+field is the command version.
+.Sh METHODS
+The generic Netlink framework provides the base family,
+.Dv GENL_ID_CTRL
+("nlctrl") with a fixed family id.
+This family is used to list the details of all registered families.
+.Pp
+The following messages are supported by the framework:
+.Ss CTRL_CMD_GETFAMILY
+Fetches a single family or all registered families, depending on the
+.Dv NLM_F_DUMP
+flag.
+Each family is reported as
+.Dv CTRL_CMD_NEWFAMILY
+message.
+The following filters are recognised by the kernel:
+.Pp
+.Bd -literal -offset indent -compact
+CTRL_ATTR_FAMILY_ID (uint16_t) current family id assigned by kernel
+CTRL_ATTR_FAMILY_NAME (string) family name
+.Ed
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv CTRL_ATTR_FAMILY_ID
+(uint16_t) Dynamically-assigned family identifier.
+.It Dv CTRL_ATTR_FAMILY_NAME
+(string) Family name.
+.It Dv CTRL_ATTR_HDRSIZE
+(uint32_t) Family mandatory header size (typically 0).
+.It Dv CTRL_ATTR_MAXATTR
+(uint32_t) Maximum attribute number valid for the family.
+.It Dv CTRL_ATTR_OPS
+(nested) List of the operations supported by the family.
+The attribute consists of a list of nested TLVs, with attribute values
+monotonically incremented, starting from 0.
+The following attributes are present in each TLV:
+.Bl -tag -width indent
+.It Dv CTRL_ATTR_OP_ID
+Operation (message) number.
+.It Dv CTRL_ATTR_OP_FLAGS
+Operation flags.
+The following flags are supported:
+.Bd -literal -offset indent -compact
+GENL_ADMIN_PERM requires elevated permissions
+GENL_CMD_CAP_DO operation is a modification request
+GENL_CMD_CAP_DUMP operation is a get/dump request
+.Ed
+.El
+.It Dv CTRL_ATTR_MCAST_GROUPS
+(nested) List of the notification groups supported by the family.
+The attribute consists of a list of nested TLVs, with attribute values
+monotonically incremented, starting from 0.
+The following attributes are present in each TLV:
+.Bl -tag -width indent
+.It Dv CTRL_ATTR_MCAST_GRP_ID
+Group id that can be used in
+.Dv NETLINK_ADD_MEMBERSHIP
+.Xr setsockopt 2 .
+.It Dv CTRL_ATTR_MCAST_GRP_NAME
+(string) Human-readable name of the group.
+.El
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+"notify" Notifies on family registrations/removal.
+.Ed
+.Sh SEE ALSO
+.Xr netlink 4
+.Sh HISTORY
+The
+.Dv NETLINK_GENERIC
+protocol family appeared in
+.Fx 14.0 .
+.Sh AUTHORS
+The netlink was implementated by
+.An -nosplit
+.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org .
+It was derived from the Google Summer of Code 2021 project by
+.An Ng Peng Nam Sean .
diff --git a/share/man/man4/iichid.4 b/share/man/man4/iichid.4
index 526a6f444440..1bd75c2db883 100644
--- a/share/man/man4/iichid.4
+++ b/share/man/man4/iichid.4
@@ -76,7 +76,7 @@ In that case
.Nm
enables sampling mode with periodic polling of hardware by driver means.
See dev.iichid.*.sampling_*
-.Xr sysctl 4
+.Xr sysctl 8
variables for tuning of sampling parameters.
.Sh HISTORY
The
diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4
index 31c80feecfaa..45da9301f86f 100644
--- a/share/man/man4/inet.4
+++ b/share/man/man4/inet.4
@@ -28,7 +28,7 @@
.\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd August 1, 2022
+.Dd September 8, 2022
.Dt INET 4
.Os
.Sh NAME
@@ -186,6 +186,8 @@ Defaults to off.
.It Va fragpackets
Integer: Current number of IPv4 fragment reassembly queue entries
for the VNET (read-only).
+.It Va fragttl
+Integer: time to live for IPv4 packet fragments in the per-VNET reassemby queue.
.It Va loopback_prefixlen
Integer: prefix length of the address space reserved for loopback purposes.
The default is 8, meaning that 127.0.0.0/8 is reserved for loopback,
@@ -278,6 +280,8 @@ The number must be between 512 and 32768 inclusive.
This is a per-VNET value.
.It Va random_id_total
Integer: count of IP IDs created (read-only, per-VNET).
+.It Va reass_hashsize
+Number of hash slots in the IPv4 reassembly queue (loader tunable).
.It Va redirect
Boolean: enable/disable sending of ICMP redirects in response to
.Tn IP
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
index d1c3b34b51a6..282b076a2bef 100644
--- a/share/man/man4/ip.4
+++ b/share/man/man4/ip.4
@@ -453,21 +453,6 @@ In scenarios such as benchmarking, this behavior may be undesirable.
In these cases,
.Va net.inet.ip.portrange.randomized
can be used to toggle randomization off.
-If more than
-.Va net.inet.ip.portrange.randomcps
-ports have been allocated in the last second, then return to sequential
-port allocation.
-Return to random allocation only once the current port allocation rate
-drops below
-.Va net.inet.ip.portrange.randomcps
-for at least
-.Va net.inet.ip.portrange.randomtime
-seconds.
-The default values for
-.Va net.inet.ip.portrange.randomcps
-and
-.Va net.inet.ip.portrange.randomtime
-are 10 port allocations per second and 45 seconds correspondingly.
.Ss "Multicast Options"
.Tn IP
multicasting is supported only on
diff --git a/share/man/man4/ip6.4 b/share/man/man4/ip6.4
index 9dd9007866a2..3c6c5969ecb5 100644
--- a/share/man/man4/ip6.4
+++ b/share/man/man4/ip6.4
@@ -229,7 +229,7 @@ Get or set whether a datagram's original destination address and port are
returned as ancillary data along with the payload in subsequent
.Xr recvmsg 2
calls.
-The information is stored in the the ancillary data as a
+The information is stored in the ancillary data as a
.Tn sockaddr_in6
structure.
.It Dv IPV6_PORTRANGE Fa "int *"
diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4
index bfb3c00d9217..94614b3b15ff 100644
--- a/share/man/man4/iwlwifi.4
+++ b/share/man/man4/iwlwifi.4
@@ -186,7 +186,7 @@ Intel(R) Wi-Fi 6 AX204 160MHz
.Nm
will be a successor to
.Xr iwm 4
-and may superseed that driver in the future.
+and may supersede that driver in the future.
It still complements the
.Xr iwn 4
driver which supports older chipsets.
diff --git a/share/man/man4/mod_cc.4 b/share/man/man4/mod_cc.4
index a00f17ede5e4..a03ff0630c15 100644
--- a/share/man/man4/mod_cc.4
+++ b/share/man/man4/mod_cc.4
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 6, 2019
+.Dd September 13, 2022
.Dt MOD_CC 4
.Os
.Sh NAME
@@ -47,7 +47,7 @@ using the
.Xr kld 4
facility.
.Pp
-The default algorithm is NewReno, and all connections use the default unless
+The default algorithm is CUBIC, and all connections use the default unless
explicitly overridden using the
.Dv TCP_CONGESTION
socket option (see
@@ -127,7 +127,7 @@ For further explanation please see the internet-draft.
.Pp
Each congestion control module may also expose other MIB variables
to control their behaviour.
-Note that both newreno and cubic now support hystart++ based on the version 3 of the internet-draft.
+Note that both NewReno and CUBIC now support Hystart++ based on the version 3 of the internet-draft.
.Sh Kernel Configuration
All of the available congestion control modules may also be loaded
via kernel configutation options.
@@ -138,10 +138,10 @@ Compilation of the kernel will fail if these two conditions are not met.
The framework exposes the following kernel configuration options.
.Bl -tag -width ".Va CC_NEWRENO"
.It Va CC_NEWRENO
-This directive loads the newreno congestion control algorithm and is included
-in GENERIC by default.
+This directive loads the NewReno congestion control algorithm.
.It Va CC_CUBIC
-This directive loads the cubic congestion control algorithm.
+This directive loads the CUBIC congestion control algorithm and is included
+in GENERIC by default.
.It Va CC_VEGAS
This directive loads the vegas congestion control algorithm, note that
this algorithm also requires the TCP_HHOOK option as well.
@@ -160,7 +160,7 @@ this algorithm also requires the TCP_HHOOK option as well.
This directive loads the htcp congestion control algorithm.
.It Va CC_DEFAULT
This directive specifies the string that represents the name of the system default algorithm, the GENERIC kernel
-defaults this to newreno.
+defaults this to CUBIC.
.El
.Sh SEE ALSO
.Xr cc_cdg 4 ,
diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4
index 3cc516397e33..e6bd863dfe35 100644
--- a/share/man/man4/mpr.4
+++ b/share/man/man4/mpr.4
@@ -2,7 +2,7 @@
.\" Copyright (c) 2010 Spectra Logic Corporation
.\" Copyright (c) 2014 LSI Corp
.\" Copyright (c) 2015-2017 Avago Technologies
-.\" Copyright (c) 2015-2017 Broadcom Ltd.
+.\" Copyright (c) 2015-2022 Broadcom Ltd.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -99,6 +99,10 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe)
Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe)
.It
Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3816 (16 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3916 (16 Port SAS/PCIe)
.El
.Sh CONFIGURATION
In all tunable descriptions below, X represents the adapter number.
diff --git a/share/man/man4/netdump.4 b/share/man/man4/netdump.4
index a6150eb758e3..ba39452c7076 100644
--- a/share/man/man4/netdump.4
+++ b/share/man/man4/netdump.4
@@ -24,16 +24,18 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 25, 2020
+.Dd November 10, 2022
.Dt NETDUMP 4
.Os
.Sh NAME
.Nm netdump
.Nd protocol for transmitting kernel dumps to a remote server
.Sh SYNOPSIS
-To compile netdump client support into the kernel, place the following line in
+To compile netdump client support into the kernel, place the following lines in
your kernel configuration file:
.Bd -ragged -offset indent
+.Cd "options INET"
+.Cd "options DEBUGNET"
.Cd "options NETDUMP"
.Ed
.Sh DESCRIPTION
diff --git a/share/man/man4/netgdb.4 b/share/man/man4/netgdb.4
index aaa2a2801ca7..81bc2fe969a1 100644
--- a/share/man/man4/netgdb.4
+++ b/share/man/man4/netgdb.4
@@ -24,18 +24,21 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 17, 2019
+.Dd November 10, 2022
.Dt NETGDB 4
.Os
.Sh NAME
.Nm netgdb
.Nd protocol for debugging the kernel with GDB over the network
.Sh SYNOPSIS
-NetGDB support is compiled by default, if DDB, GDB, and INET are enabled.
-To build a kernel without it, add the following line to your kernel
-configuration file:
+To compile NetGDB support into the kernel, place the following lines in your
+kernel configuration file:
.Bd -ragged -offset indent
-.Cd "nooptions NETGDB"
+.Cd "options DDB"
+.Cd "options GDB"
+.Cd "options INET"
+.Cd "options DEBUGNET"
+.Cd "options NETGDB"
.Ed
.Sh DESCRIPTION
.Nm
diff --git a/share/man/man4/netlink.4 b/share/man/man4/netlink.4
new file mode 100644
index 000000000000..bbfa55049e2e
--- /dev/null
+++ b/share/man/man4/netlink.4
@@ -0,0 +1,349 @@
+.\"
+.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 30, 2022
+.Dt NETLINK 4
+.Os
+.Sh NAME
+.Nm Netlink
+.Nd Kernel network configuration protocol
+.Sh SYNOPSIS
+.In netlink/netlink.h
+.In netlink/netlink_route.h
+.Ft int
+.Fn socket AF_NETLINK SOCK_DGRAM int family
+.Sh DESCRIPTION
+Netlink is a user-kernel message-based communication protocol primarily used
+for network stack configuration.
+Netlink is easily extendable and supports large dumps and event
+notifications, all via a single socket.
+The protocol is fully asynchronous, allowing one to issue and track multiple
+requests at once.
+Netlink consists of multiple families, which commonly group the commands
+belonging to the particular kernel subsystem.
+Currently, the supported families are:
+.Pp
+.Bd -literal -offset indent -compact
+NETLINK_ROUTE network configuration,
+NETLINK_GENERIC "container" family
+.Ed
+.Pp
+The
+.Dv NETLINK_ROUTE
+family handles all interfaces, addresses, neighbors, routes, and VNETs
+configuration.
+More details can be found in
+.Xr rtnetlink 4 .
+The
+.Dv NETLINK_GENERIC
+family serves as a
+.Do container Dc ,
+allowing registering other families under the
+.Dv NETLINK_GENERIC
+umbrella.
+This approach allows using a single netlink socket to interact with
+multiple netlink families at once.
+More details can be found in
+.Xr genetlink 4 .
+.Pp
+Netlink has its own sockaddr structure:
+.Bd -literal
+struct sockaddr_nl {
+ uint8_t nl_len; /* sizeof(sockaddr_nl) */
+ sa_family_t nl_family; /* netlink family */
+ uint16_t nl_pad; /* reserved, set to 0 */
+ uint32_t nl_pid; /* automatically selected, set to 0 */
+ uint32_t nl_groups; /* multicast groups mask to bind to */
+};
+.Ed
+.Pp
+Typically, filling this structure is not required for socket operations.
+It is presented here for completeness.
+.Sh PROTOCOL DESCRIPTION
+The protocol is message-based.
+Each message starts with the mandatory
+.Va nlmsghdr
+header, followed by the family-specific header and the list of
+type-length-value pairs (TLVs).
+TLVs can be nested.
+All headers and TLVS are padded to 4-byte boundaries.
+Each
+.Xr send 2 or
+.Xr recv 2
+system call may contain multiple messages.
+.Ss BASE HEADER
+.Bd -literal
+struct nlmsghdr {
+ uint32_t nlmsg_len; /* Length of message including header */
+ uint16_t nlmsg_type; /* Message type identifier */
+ uint16_t nlmsg_flags; /* Flags (NLM_F_) */
+ uint32_t nlmsg_seq; /* Sequence number */
+ uint32_t nlmsg_pid; /* Sending process port ID */
+};
+.Ed
+.Pp
+The
+.Va nlmsg_len
+field stores the whole message length, in bytes, including the header.
+This length has to be rounded up to the nearest 4-byte boundary when
+iterating over messages.
+The
+.Va nlmsg_type
+field represents the command/request type.
+This value is family-specific.
+The list of supported commands can be found in the relevant family
+header file.
+.Va nlmsg_seq
+is a user-provided request identifier.
+An application can track the operation result using the
+.Dv NLMSG_ERROR
+messages and matching the
+.Va nlmsg_seq
+.
+The
+.Va nlmsg_pid
+field is the message sender id.
+This field is optional for userland.
+The kernel sender id is zero.
+The
+.Va nlmsg_flags
+field contains the message-specific flags.
+The following generic flags are defined:
+.Pp
+.Bd -literal -offset indent -compact
+NLM_F_REQUEST Indicates that the message is an actual request to the kernel
+NLM_F_ACK Request an explicit ACK message with an operation result
+.Ed
+.Pp
+The following generic flags are defined for the "GET" request types:
+.Pp
+.Bd -literal -offset indent -compact
+NLM_F_ROOT Return the whole dataset
+NLM_F_MATCH Return all entries matching the criteria
+.Ed
+These two flags are typically used together, aliased to
+.Dv NLM_F_DUMP
+.Pp
+The following generic flags are defined for the "NEW" request types:
+.Pp
+.Bd -literal -offset indent -compact
+NLM_F_CREATE Create an object if none exists
+NLM_F_EXCL Don't replace an object if it exists
+NLM_F_REPLACE Replace an existing matching object
+NLM_F_APPEND Append to an existing object
+.Ed
+.Pp
+The following generic flags are defined for the replies:
+.Pp
+.Bd -literal -offset indent -compact
+NLM_F_MULTI Indicates that the message is part of the message group
+NLM_F_DUMP_INTR Indicates that the state dump was not completed
+NLM_F_DUMP_FILTERED Indicates that the dump was filtered per request
+NLM_F_CAPPED Indicates the original message was capped to its header
+NLM_F_ACK_TLVS Indicates that extended ACK TLVs were included
+.Ed
+.Ss TLVs
+Most messages encode their attributes as type-length-value pairs (TLVs).
+The base TLV header:
+.Bd -literal
+struct nlattr {
+ uint16_t nla_len; /* Total attribute length */
+ uint16_t nla_type; /* Attribute type */
+};
+.Ed
+The TLV type
+.Pq Va nla_type
+scope is typically the message type or group within a family.
+For example, the
+.Dv RTN_MULTICAST
+type value is only valid for
+.Dv RTM_NEWROUTE
+,
+.Dv RTM_DELROUTE
+and
+.Dv RTM_GETROUTE
+messages.
+TLVs can be nested; in that case internal TLVs may have their own sub-types.
+All TLVs are packed with 4-byte padding.
+.Ss CONTROL MESSAGES
+A number of generic control messages are reserved in each family.
+.Pp
+.Dv NLMSG_ERROR
+reports the operation result if requested, optionally followed by
+the metadata TLVs.
+The value of
+.Va nlmsg_seq
+is set to its value in the original messages, while
+.Va nlmsg_pid
+is set to the socket pid of the original socket.
+The operation result is reported via
+.Vt "struct nlmsgerr":
+.Bd -literal
+struct nlmsgerr {
+ int error; /* Standard errno */
+ struct nlmsghdr msg; /* Original message header */
+};
+.Ed
+If the
+.Dv NETLINK_CAP_ACK
+socket option is not set, the remainder of the original message will follow.
+If the
+.Dv NETLINK_EXT_ACK
+socket option is set, the kernel may add a
+.Dv NLMSGERR_ATTR_MSG
+string TLV with the textual error description, optionally followed by the
+.Dv NLMSGERR_ATTR_OFFS
+TLV, indicating the offset from the message start that triggered an error.
+If the operation reply is a multipart message, then no
+.Dv NLMSG_ERROR
+reply is generated, only a
+.Dv NLMSG_DONE
+message, closing multipart sequence.
+.Pp
+.Dv NLMSG_DONE
+indicates the end of the message group: typically, the end of the dump.
+It contains a single
+.Vt int
+field, describing the dump result as a standard errno value.
+.Sh SOCKET OPTIONS
+Netlink supports a number of custom socket options, which can be set with
+.Xr setsockopt 2
+with the
+.Dv SOL_NETLINK
+.Fa level :
+.Bl -tag -width indent
+.It Dv NETLINK_ADD_MEMBERSHIP
+Subscribes to the notifications for the specific group (int).
+.It Dv NETLINK_DROP_MEMBERSHIP
+Unsubscribes from the notifications for the specific group (int).
+.It Dv NETLINK_LIST_MEMBERSHIPS
+Lists the memberships as a bitmask.
+.It Dv NETLINK_CAP_ACK
+Instructs the kernel to send the original message header in the reply
+without the message body.
+.It Dv NETLINK_EXT_ACK
+Acknowledges ability to receive additional TLVs in the ACK message.
+.El
+.Pp
+Additionally, netlink overrides the following socket options from the
+.Dv SOL_SOCKET
+.Fa level :
+.Bl -tag -width indent
+.It Dv SO_RCVBUF
+Sets the maximum size of the socket receive buffer.
+If the caller has
+.Dv PRIV_NET_ROUTE
+permission, the value can exceed the currently-set
+.Va kern.ipc.maxsockbuf
+value.
+.El
+.Sh SYSCTL VARIABLES
+A set of
+.Xr sysctl 8
+variables is available to tweak run-time parameters:
+.Bl -tag -width indent
+.It Va net.netlink.sendspace
+Default send buffer for the netlink socket.
+Note that the socket sendspace has to be at least as long as the longest
+message that can be transmitted via this socket.
+.El
+.Bl -tag -width indent
+.It Va net.netlink.recvspace
+Default receive buffer for the netlink socket.
+Note that the socket recvspace has to be least as long as the longest
+message that can be received from this socket.
+.El
+.Sh DEBUGGING
+Netlink implements per-functional-unit debugging, with different severities
+controllable via the
+.Va net.netlink.debug
+branch.
+These messages are logged in the kernel message buffer and can be seen in
+.Xr dmesg 8
+.
+The following severity levels are defined:
+.Bl -tag -width indent
+.It Dv LOG_DEBUG(7)
+Rare events or per-socket errors are reported here.
+This is the default level, not impacting production performance.
+.It Dv LOG_DEBUG2(8)
+Socket events such as groups memberships, privilege checks, commands and dumps
+are logged.
+This level does not incur significant performance overhead.
+.It Dv LOG_DEBUG9(9)
+All socket events, each dumped or modified entities are logged.
+Turning it on may result in significant performance overhead.
+.El
+.Sh ERRORS
+Netlink reports operation results, including errors and error metadata, by
+sending a
+.Dv NLMSG_ERROR
+message for each request message.
+The following errors can be returned:
+.Bl -tag -width Er
+.It Bq Er EPERM
+when the current privileges are insufficient to perform the required operation;
+.It Bo Er ENOBUFS Bc or Bo Er ENOMEM Bc
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er ENOTSUP
+when the requested command is not supported by the family or
+the family is not supported;
+.It Bq Er EINVAL
+when some necessary TLVs are missing or invalid, detailed info
+may be provided in NLMSGERR_ATTR_MSG and NLMSGERR_ATTR_OFFS TLVs;
+.It Bq Er ENOENT
+when trying to delete a non-existent object.
+.Pp
+Additionally, a socket operation itself may fail with one of the errors
+specified in
+.Xr socket 2
+,
+.Xr recv 2
+or
+.Xr send 2
+.
+.El
+.Sh SEE ALSO
+.Xr genetrlink 4 ,
+.Xr rtnetlink 4
+.Rs
+.%A "J. Salim"
+.%A "H. Khosravi"
+.%A "A. Kleen"
+.%A "A. Kuznetsov"
+.%T "Linux Netlink as an IP Services Protocol"
+.%O "RFC 3549"
+.Re
+.Sh HISTORY
+The netlink protocol appeared in
+.Fx 14.0 .
+.Sh AUTHORS
+The netlink was implemented by
+.An -nosplit
+.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org .
+It was derived from the Google Summer of Code 2021 project by
+.An Ng Peng Nam Sean .
diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4
index 3c2c08afe466..f7535aa86d12 100644
--- a/share/man/man4/pci.4
+++ b/share/man/man4/pci.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 13, 2021
+.Dd October 4, 2022
.Dt PCI 4
.Os
.Sh NAME
@@ -572,6 +572,8 @@ MSI interrupts can be disabled by setting this tunable to 0.
Enable support for extended Message Signalled Interrupts
.Pq MSI-X .
MSI-X interrupts can be disabled by setting this tunable to 0.
+.It Va hw.pci.enable_pcie_ei Pq Defaults to 0
+Enable support for PCI-express Electromechanical Interlock.
.It Va hw.pci.enable_pcie_hp Pq Defaults to 1
Enable support for native PCI-express HotPlug.
.It Va hw.pci.honor_msi_blacklist Pq Defaults to 1
diff --git a/share/man/man4/re.4 b/share/man/man4/re.4
index 9b54c0c1f20b..234698089fcb 100644
--- a/share/man/man4/re.4
+++ b/share/man/man4/re.4
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 21, 2016
+.Dd November 7, 2022
.Dt RE 4
.Os
.Sh NAME
@@ -285,3 +285,6 @@ avoid this problem.
.Pp
The RealTek 8169, 8169S and 8110S chips appear to only be capable of
transmitting jumbo frames up to 7.5K in size.
+.Pp
+If this driver is causing problems then an updated driver from
+the vendor can be found in ports under net/realtek-re-kmod.
diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4
new file mode 100644
index 000000000000..9f20671719f0
--- /dev/null
+++ b/share/man/man4/rtnetlink.4
@@ -0,0 +1,519 @@
+.\"
+.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 1, 2022
+.Dt RTNETLINK 4
+.Os
+.Sh NAME
+.Nm RTNetlink
+.Nd Network configuration-specific Netlink family
+.Sh SYNOPSIS
+.In netlink/netlink.h
+.In netlink/netlink_route.h
+.Ft int
+.Fn socket AF_NETLINK SOCK_DGRAM NETLINK_ROUTE
+.Sh DESCRIPTION
+The
+.Dv NETLINK_ROUTE
+family aims to be the primary configuration mechanism for all
+network-related tasks.
+Currently it supports configuring interfaces, interface addresses, routes,
+nexthops and arp/ndp neighbors.
+.Sh ROUTES
+All route configuration messages share the common header:
+.Bd -literal
+struct rtmsg {
+ unsigned char rtm_family; /* address family */
+ unsigned char rtm_dst_len; /* Prefix length */
+ unsigned char rtm_src_len; /* Deprecated, set to 0 */
+ unsigned char rtm_tos; /* Type of service (not used) */
+ unsigned char rtm_table; /* deprecated, set to 0 */
+ unsigned char rtm_protocol; /* Routing protocol id (RTPROT_) */
+ unsigned char rtm_scope; /* Route distance (RT_SCOPE_) */
+ unsigned char rtm_type; /* Route type (RTN_) */
+ unsigned rtm_flags; /* Route flags (not supported) */
+};
+.Ed
+.Pp
+The
+.Va rtm_family
+specifies the route family to be operated on.
+Currently,
+.Dv AF_INET6
+and
+.Dv AF_INET
+are the only supported families.
+The route prefix length is stored in
+.Va rtm_dst_len
+.
+The caller should set the originator identity (one of the
+.Dv RTPROT_
+values) in
+.Va rtm_protocol
+.
+It is useful for users and for the application itself, allowing for easy
+identification of self-originated routes.
+The route scope has to be set via
+.Va rtm_scope
+field.
+The supported values are:
+.Bd -literal -offset indent -compact
+RT_SCOPE_UNIVERSE Global scope
+RT_SCOPE_LINK Link scope
+.Ed
+.Pp
+Route type needs to be set.
+The defined values are:
+.Bd -literal -offset indent -compact
+RTN_UNICAST Unicast route
+RTN_MULTICAST Multicast route
+RTN_BLACKHOLE Drops traffic towards destination
+RTN_PROHIBIT Drops traffic and sends reject
+.Ed
+.Pp
+The following messages are supported:
+.Ss RTM_NEWROUTE
+Adds a new route.
+All NL flags are supported.
+Extending a multipath route requires NLM_F_APPEND flag.
+.Ss RTM_DELROUTE
+Tries to delete a route.
+The route is specified using a combination of
+.Dv RTA_DST
+TLV and
+.Va rtm_dst_len .
+.Ss RTM_GETROUTE
+Fetches a single route or all routes in the current VNET, depending on the
+.Dv NLM_F_DUMP
+flag.
+Each route is reported as
+.Dv RTM_NEWROUTE
+message.
+The following filters are recognised by the kernel:
+.Pp
+.Bd -literal -offset indent -compact
+rtm_family required family or AF_UNSPEC
+RTA_TABLE fib number or RT_TABLE_UNSPEC to return all fibs
+.Ed
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv RTA_DST
+(binary) IPv4/IPv6 address, depending on the
+.Va rtm_family .
+.It Dv RTA_OIF
+(uint32_t) transmit interface index.
+.It Dv RTA_GATEWAY
+(binary) IPv4/IPv6 gateway address, depending on the
+.Va rtm_family .
+.It Dv RTA_METRICS
+(nested) Container attribute, listing route properties.
+The only supported sub-attribute is
+.Dv RTAX_MTU , which stores path MTU as uint32_t.
+.It Dv RTA_MULTIPATH
+This attribute contains multipath route nexthops with their weights.
+These nexthops are represented as a sequence of
+.Va rtnexthop
+structures, each followed by
+.Dv RTA_GATEWAY
+or
+.Dv RTA_VIA
+attributes.
+.Bd -literal
+struct rtnexthop {
+ unsigned short rtnh_len;
+ unsigned char rtnh_flags;
+ unsigned char rtnh_hops; /* nexthop weight */
+ int rtnh_ifindex;
+};
+.Ed
+.Pp
+The
+.Va rtnh_len
+field specifies the total nexthop info length, including both
+.Va struct rtnexthop
+and the following TLVs.
+The
+.Va rtnh_hops
+field stores relative nexthop weight, used for load balancing between group
+members.
+The
+.Va rtnh_ifindex
+field contains the index of the transmit interface.
+.Pp
+The following TLVs can follow the structure:
+.Bd -literal -offset indent -compact
+RTA_GATEWAY IPv4/IPv6 nexthop address of the gateway
+RTA_VIA IPv6 nexthop address for IPv4 route
+RTA_KNH_ID Kernel-specific index of the nexthop
+.Ed
+.It Dv RTA_KNH_ID
+(uint32_t) (FreeBSD-specific) Auto-allocated kernel index of the nexthop.
+.It Dv RTA_RTFLAGS
+(uint32_t) (FreeBSD-specific) rtsock route flags.
+.It Dv RTA_TABLE
+(uint32_t) Fib number of the route.
+Default route table is
+.Dv RT_TABLE_MAIN .
+To explicitely specify "all tables" one needs to set the value to
+.Dv RT_TABLE_UNSPEC .
+.It Dv RTA_EXPIRES
+(uint32_t) seconds till path expiration.
+.It Dv RTA_NH_ID
+(uint32_t) useland nexthop or nexthop group index.
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+RTNLGRP_IPV4_ROUTE Notifies on IPv4 route arrival/removal/change
+RTNLGRP_IPV6_ROUTE Notifies on IPv6 route arrival/removal/change
+.Ed
+.Sh NEXTHOPS
+All nexthop/nexthop group configuration messages share the common header:
+.Bd -literal
+struct nhmsg {
+ unsigned char nh_family; /* transport family */
+ unsigned char nh_scope; /* ignored on RX, filled by kernel */
+ unsigned char nh_protocol; /* Routing protocol that installed nh */
+ unsigned char resvd;
+ unsigned int nh_flags; /* RTNH_F_* flags from route.h */
+};
+.Ed
+The
+.Va nh_family
+specificies the gateway address family.
+It can be different from route address family for IPv4 routes with IPv6
+nexthops.
+The
+.Va nh_protocol
+is similar to
+.Va rtm_protocol
+field, which designates originator application identity.
+.Pp
+The following messages are supported:
+.Ss RTM_NEWNEXTHOP
+Creates a new nexthop or nexthop group.
+.Ss RTM_DELNEXTHOP
+Deletes nexthop or nexthhop group.
+The required object is specified by the
+.Dv RTA_NH_ID
+attribute.
+.Ss RTM_GETNEXTHOP
+Fetches a single nexthop or all nexthops/nexthop groups, depending on the
+.Dv NLM_F_DUMP
+flag.
+The following filters are recognised by the kernel:
+.Pp
+.Bd -literal -offset indent -compact
+RTA_NH_ID nexthop or nexthtop group id
+NHA_GROUPS match only nexthtop groups
+.Ed
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv RTA_NH_ID
+(uint32_t) Nexthhop index used to identify particular nexthop or nexthop group.
+Should be provided by userland at the nexthtop creation time.
+.It Dv NHA_GROUP
+This attribute designates the nexthtop group and contains all of its nexthtops
+and their relative weights.
+The attribute constists of a list of
+.Va nexthop_grp
+structures:
+.Bd -literal
+struct nexthop_grp {
+ uint32_t id; /* nexhop userland index */
+ uint8_t weight; /* weight of this nexthop */
+ uint8_t resvd1;
+ uint16_t resvd2;
+};
+.Ed
+.It Dv NHA_GROUP_TYPE
+(uint16_t) Nexthtop group type, set to one of the following types:
+.Bd -literal -offset indent -compact
+NEXTHOP_GRP_TYPE_MPATH default multipath group
+.Ed
+.It Dv NHA_BLACKHOLE
+(flag) Marks the nexthtop as blackhole.
+.It Dv NHA_OIF
+(uint32_t) Transmit interface index of the nexthtop.
+.It Dv NHA_GATEWAY
+(binary) IPv4/IPv6 gateway address
+.It Dv NHA_GROUPS
+(flag) Matches nexthtop groups during dump.
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+RTNLGRP_NEXTHOP Notifies on nexthop/groups arrival/removal/change
+.Ed
+.Sh INTERFACES
+All interface configuration messages share the common header:
+.Bd -literal
+struct ifinfomsg {
+ unsigned char ifi_family; /* not used, set to 0 */
+ unsigned char __ifi_pad;
+ unsigned short ifi_type; /* ARPHRD_* */
+ int ifi_index; /* Inteface index */
+ unsigned ifi_flags; /* IFF_* flags */
+ unsigned ifi_change; /* IFF_* change mask */
+};
+.Ed
+.Ss RTM_NEWLINK
+Creates a new interface.
+The only mandatory TLV is
+.Dv IFLA_IFNAME .
+.Ss RTM_DELLINK
+Deletes the interface specified by
+.Dv IFLA_IFNAME .
+.Ss RTM_GETLINK
+Fetches a single interface or all interfaces in the current VNET, depending on the
+.Dv NLM_F_DUMP
+flag.
+Each interface is reported as a
+.Dv RTM_NEWLINK
+message.
+The following filters are recognised by the kernel:
+.Pp
+.Bd -literal -offset indent -compact
+ifi_index interface index
+IFLA_IFNAME interface name
+IFLA_ALT_IFNAME interface name
+.Ed
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv IFLA_ADDRESS
+(binary) Llink-level interface address (MAC).
+.It Dv IFLA_BROADCAST
+(binary) (readonly) Link-level broadcast address.
+.It Dv IFLA_IFNAME
+(string) New interface name.
+.It Dv IFLA_LINK
+(uint32_t) (readonly) Interface index.
+.It Dv IFLA_MASTER
+(uint32_t) Parent interface index.
+.It Dv IFLA_LINKINFO
+(nested) Interface type-specific attributes:
+.Bd -literal -offset indent -compact
+IFLA_INFO_KIND (string) interface type ("vlan")
+IFLA_INFO_DATA (nested) custom attributes
+.Ed
+The following types and attributes are supported:
+.Bl -tag -width indent
+.It Dv vlan
+.Bd -literal -offset indent -compact
+IFLA_VLAN_ID (uint16_t) 802.1Q vlan id
+IFLA_VLAN_PROTOCOL (uint16_t) Protocol: ETHERTYPE_VLAN or ETHERTYPE_QINQ
+.Ed
+.El
+.It Dv IFLA_OPERSTATE
+(uint8_t) Interface operational state per RFC 2863.
+Can be one of the following:
+.Bd -literal -offset indent -compact
+IF_OPER_UNKNOWN status can not be determined
+IF_OPER_NOTPRESENT some (hardware) component not present
+IF_OPER_DOWN down
+IF_OPER_LOWERLAYERDOWN some lower-level interface is down
+IF_OPER_TESTING in some test mode
+IF_OPER_DORMANT "up" but waiting for some condition (802.1X)
+IF_OPER_UP ready to pass packets
+.Ed
+.It Dv IFLA_STATS64
+(readonly) Consists of the following 64-bit counters structure:
+.Bd -literal
+struct rtnl_link_stats64 {
+ uint64_t rx_packets; /* total RX packets (IFCOUNTER_IPACKETS) */
+ uint64_t tx_packets; /* total TX packets (IFCOUNTER_OPACKETS) */
+ uint64_t rx_bytes; /* total RX bytes (IFCOUNTER_IBYTES) */
+ uint64_t tx_bytes; /* total TX bytes (IFCOUNTER_OBYTES) */
+ uint64_t rx_errors; /* RX errors (IFCOUNTER_IERRORS) */
+ uint64_t tx_errors; /* RX errors (IFCOUNTER_OERRORS) */
+ uint64_t rx_dropped; /* RX drop (no space in ring/no bufs) (IFCOUNTER_IQDROPS) */
+ uint64_t tx_dropped; /* TX drop (IFCOUNTER_OQDROPS) */
+ uint64_t multicast; /* RX multicast packets (IFCOUNTER_IMCASTS) */
+ uint64_t collisions; /* not supported */
+ uint64_t rx_length_errors; /* not supported */
+ uint64_t rx_over_errors; /* not supported */
+ uint64_t rx_crc_errors; /* not supported */
+ uint64_t rx_frame_errors; /* not supported */
+ uint64_t rx_fifo_errors; /* not supported */
+ uint64_t rx_missed_errors; /* not supported */
+ uint64_t tx_aborted_errors; /* not supported */
+ uint64_t tx_carrier_errors; /* not supported */
+ uint64_t tx_fifo_errors; /* not supported */
+ uint64_t tx_heartbeat_errors; /* not supported */
+ uint64_t tx_window_errors; /* not supported */
+ uint64_t rx_compressed; /* not supported */
+ uint64_t tx_compressed; /* not supported */
+ uint64_t rx_nohandler; /* dropped due to no proto handler (IFCOUNTER_NOPROTO) */
+};
+.Ed
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+RTNLGRP_LINK Notifies on interface arrival/removal/change
+.Ed
+.Sh INTERFACE ADDRESSES
+All interface address configuration messages share the common header:
+.Bd -literal
+struct ifaddrmsg {
+ uint8_t ifa_family; /* Address family */
+ uint8_t ifa_prefixlen; /* Prefix length */
+ uint8_t ifa_flags; /* Address-specific flags */
+ uint8_t ifa_scope; /* Address scope */
+ uint32_t ifa_index; /* Link ifindex */
+};
+.Ed
+.Pp
+The
+.Va ifa_family
+specifies the address family of the interface address.
+The
+.Va ifa_prefixlen
+specifies the prefix length if applicable for the address family.
+The
+.Va ifa_index
+specifies the interface index of the target interface.
+.Ss RTM_NEWADDR
+Not supported
+.Ss RTM_DELADDR
+Not supported
+.Ss RTM_GETADDR
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv IFA_ADDRESS
+(binary) masked interface address or destination address for p2p interfaces.
+.It Dv IFA_LOCAL
+(binary) local interface address
+.It Dv IFA_BROADCAST
+(binary) broacast interface address
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+RTNLGRP_IPV4_IFADDR Notifies on IPv4 ifaddr arrival/removal/change
+RTNLGRP_IPV6_IFADDR Notifies on IPv6 ifaddr arrival/removal/change
+.Ed
+.Sh NEIGHBORS
+All neighbor configuration messages share the common header:
+.Bd -literal
+struct ndmsg {
+ uint8_t ndm_family;
+ uint8_t ndm_pad1;
+ uint16_t ndm_pad2;
+ int32_t ndm_ifindex;
+ uint16_t ndm_state;
+ uint8_t ndm_flags;
+ uint8_t ndm_type;
+};
+.Ed
+.Pp
+The
+.Va ndm_family
+field specifies the address family (IPv4 or IPv6) of the neighbor.
+The
+.Va ndm_ifindex
+specifies the interface to operate on.
+The
+.Va ndm_state
+represents the entry state according to the neighbor model.
+The state can be one of the following:
+.Bd -literal -offset indent -compact
+NUD_INCOMPLETE No lladdr, address resolution in progress
+NUD_REACHABLE reachable & recently resolved
+NUD_STALE has lladdr but it's stale
+NUD_DELAY has lladdr, is stale, probes delayed
+NUD_PROBE has lladdr, is stale, probes sent
+NUD_FAILED unused
+.Ed
+.Pp
+The
+.Va ndm_flags
+field stores the options specific to this entry.
+Available flags:
+.Bd -literal -offset indent -compact
+NTF_SELF local station (LLE_IFADDR)
+NTF_PROXY proxy entry (LLE_PUB)
+NTF_STICKY permament entry (LLE_STATIC)
+NTF_ROUTER dst indicated itself as a router
+.Ed
+.Ss RTM_NEWNEIGH
+Creates new neighbor entry.
+The mandatory options are
+.Dv NDA_DST ,
+.Dv NDA_LLADDR
+and
+.Dv NDA_IFINDEX .
+.Ss RTM_DELNEIGH
+Deletes the neighbor entry.
+The entry is specified by the combination of
+.Dv NDA_DST
+and
+.Dv NDA_IFINDEX .
+.Ss RTM_GETNEIGH
+Fetches a single neighbor or all neighbors in the current VNET, depending on the
+.Dv NLM_F_DUMP
+flag.
+Each entry is reported as
+.Dv RTM_NEWNEIGH
+message.
+The following filters are recognised by the kernel:
+.Pp
+.Bd -literal -offset indent -compact
+ndm_family required family or AF_UNSPEC
+ndm_ifindex target ifindex
+NDA_IFINDEX target ifindex
+.Ed
+.Ss TLVs
+.Bl -tag -width indent
+.It Dv NDA_DST
+(binary) neighbor IPv4/IPv6 address.
+.It Dv NDA_LLADDR
+(binary) neighbor link-level address.
+.It Dv NDA_IFINDEX
+(uint32_t) interface index.
+.It Dv NDA_FLAGS_EXT
+(uint32_t) extended version of
+.Va ndm_flags .
+.El
+.Ss Groups
+The following groups are defined:
+.Bd -literal -offset indent -compact
+RTNLGRP_NEIGH Notifies on ARP/NDP neighbor arrival/removal/change
+.Ed
+.Sh SEE ALSO
+.Xr netlink 4 ,
+.Xr route 4
+.Sh HISTORY
+The
+.Dv NETLINK_ROUTE
+protocol family appeared in
+.Fx 14.0 .
+.Sh AUTHORS
+The netlink was implementated by
+.An -nosplit
+.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org .
+It was derived from the Google Summer of Code 2021 project by
+.An Ng Peng Nam Sean .
diff --git a/share/man/man4/run.4 b/share/man/man4/run.4
index d27bca4b10b4..222f7c843e4b 100644
--- a/share/man/man4/run.4
+++ b/share/man/man4/run.4
@@ -211,7 +211,7 @@ ifconfig wlan create wlandev run0 wlanmode adhoc ssid my_net \e
.Ed
.Sh DIAGNOSTICS
.Bl -diag
-.It "run%d: faild load firmware of file runfw"
+.It "run%d: failed load firmware of file runfw"
For some reason, the driver was unable to read the microcode file from the
filesystem.
The file might be missing or corrupted.
diff --git a/share/man/man4/snp.4 b/share/man/man4/snp.4
index ce0ef66c5721..3422b9ca5d6f 100644
--- a/share/man/man4/snp.4
+++ b/share/man/man4/snp.4
@@ -1,7 +1,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 5, 2008
+.Dd September 24, 2022
.Dt SNP 4
.Os
.Sh NAME
@@ -58,8 +58,6 @@ ioctl returns a positive value equal to the number of characters
in a read buffer.
Special values defined are:
.Bl -tag -width ".Dv SNP_TTYCLOSE"
-.It Dv SNP_OFLOW
-device overflow occurred, device detached.
.It Dv SNP_TTYCLOSE
tty not attached.
.It Dv SNP_DETACH
@@ -89,11 +87,3 @@ Previous versions of
.Nm
were based on code written by
.An Ugen J.S. Antsilevich Aq Mt ugen@NetVision.net.il .
-.Sh BUGS
-This version of
-.Nm
-does not return proper error codes when calling
-.Dv FIONREAD .
-It also does not allow
-.Dv SNPSTTY
-to detach itself from the TTY.
diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
index cdb58c7cbacc..dea7da9054d0 100644
--- a/share/man/man4/tcp.4
+++ b/share/man/man4/tcp.4
@@ -34,7 +34,7 @@
.\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd August 1, 2022
+.Dd November 7, 2022
.Dt TCP 4
.Os
.Sh NAME
@@ -282,6 +282,7 @@ this packetization may cause significant delays.
The boolean option
.Dv TCP_NODELAY
defeats this algorithm.
+
.It Dv TCP_MAXSEG
By default, a sender- and
.No receiver- Ns Tn TCP
@@ -291,6 +292,17 @@ The
.Dv TCP_MAXSEG
option allows the user to determine the result of this negotiation,
and to reduce it if desired.
+.It Dv TCP_MAXUNACKTIME
+This
+.Xr setsockopt 2
+option accepts an argument of
+.Vt "u_int"
+to set the per-socket interval, in seconds, in which the connection must
+make progress. Progress is defined by at least 1 byte being acknowledged within
+the set time period. If a connection fails to make progress, then the
+.Tn TCP
+stack will terminate the connection with a reset. Note that the default
+value for this is zero which indicates no progress checks should be made.
.It Dv TCP_NOOPT
.Tn TCP
usually sends a number of options in each packet, corresponding to
@@ -495,6 +507,13 @@ Outgoing connections will request ECN.
Allow incoming connections to request ECN.
Outgoing connections will not request ECN.
(default)
+.It 3
+Negotiate on incoming connection for Accurate ECN, ECN, or no ECN.
+Outgoing connections will request Accurate ECN and fall back to
+ECN depending on the capabilities of the server.
+.It 4
+Negotiate on incoming connection for Accurate ECN, ECN, or no ECN.
+Outgoing connections will not request ECN.
.El
.It Va ecn.maxretries
Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a
@@ -734,23 +753,6 @@ A value of 2 results in any
packets to closed ports being logged.
Any value not listed above disables the logging
(default is 0, i.e., the logging is disabled).
-.It Va maxtcptw
-When a TCP connection enters the
-.Dv TIME_WAIT
-state, its associated socket structure is freed, since it is of
-negligible size and use, and a new structure is allocated to contain a
-minimal amount of information necessary for sustaining a connection in
-this state, called the compressed TCP
-.Dv TIME_WAIT
-state.
-Since this structure is smaller than a socket structure, it can save
-a significant amount of system memory.
-The
-.Va net.inet.tcp.maxtcptw
-MIB variable controls the maximum number of these structures allocated.
-By default, it is initialized to
-.Va kern.ipc.maxsockets
-/ 5.
.It Va minmss
Minimum TCP Maximum Segment Size; used to prevent a denial of service attack
from an unreasonably low MSS.
@@ -767,7 +769,7 @@ application limited and the network bandwidth is not utilized completely.
That prevents self-inflicted packet losses once the application starts to
transmit data at a higher speed.
.It Va nolocaltimewait
-Suppress creation of compressed TCP
+Suppress creation of TCP
.Dv TIME_WAIT
states for connections in
which both endpoints are local.
@@ -873,7 +875,18 @@ minimum, which gives us an effective minimum of 200ms (similar to
The initial value is used before an RTT measurement has been performed.
.It Va rfc1323
Implement the window scaling and timestamp options of RFC 1323/RFC 7323
-(default is true).
+(default is 1).
+Settings:
+.Bl -tag -compact
+.It 0
+Disable window scaling and timestamp option.
+.It 1
+Enable window scaling and timestamp option.
+.It 2
+Enable only window scaling.
+.It 3
+Enable only timestamp option.
+.El
.It Va rfc3042
Enable the Limited Transmit algorithm as described in RFC 3042.
It helps avoid timeouts on lossy links and also when the congestion window
@@ -1041,6 +1054,7 @@ when trying to use a TCP function block that is not available;
.Xr siftr 4 ,
.Xr syncache 4 ,
.Xr tcp_bbr 4 ,
+.Xr tcp_rack 4 ,
.Xr setkey 8 ,
.Xr sysctl 8 ,
.Xr tcp_functions 9
diff --git a/share/man/man4/tcp_bbr.4 b/share/man/man4/tcp_bbr.4
index 604e205820fb..48281ad0164f 100644
--- a/share/man/man4/tcp_bbr.4
+++ b/share/man/man4/tcp_bbr.4
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2020, Gordon Bergling
+.\" Copyright (c) 2020, Gordon Bergling <gbe@FreeBSD.org>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 24, 2020
+.Dd November 7, 2022
.Dt TCP_BBR 4
.Os
.Sh NAME
@@ -129,6 +129,7 @@ Minimum RTO in ms.
.Xr h_ertt 4 ,
.Xr mod_cc 4 ,
.Xr tcp 4 ,
+.Xr tcp_rack 4 ,
.Xr mod_cc 9
.Rs
.%A "Neal Cardwell"
diff --git a/share/man/man4/tcp_rack.4 b/share/man/man4/tcp_rack.4
new file mode 100644
index 000000000000..ce424ae73045
--- /dev/null
+++ b/share/man/man4/tcp_rack.4
@@ -0,0 +1,159 @@
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2022, Gordon Bergling <gbe@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd November 7, 2022
+.Dt TCP_RACK 4
+.Os
+.Sh NAME
+.Nm tcp_rack
+.Nd TCP RACK-TLP Loss Detection Algorithm for TCP
+.Sh SYNOPSIS
+To use this TCP stack, place the following line in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options TCPHPTS"
+.Ed
+.Pp
+To load the TCP stack as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+tcp_rack_load="YES"
+.Ed
+.Pp
+To enable the TCP stack, place the following line in the
+.Xr sysctl.conf 5 :
+.Bd -literal -offset indent
+net.inet.tcp.functions_default=rack
+.Ed
+.Sh DESCRIPTION
+RACK-TLP uses per-segment transmit timestamps and selective
+acknowledgments (SACKs) and has two parts.
+Recent Acknowledgment (RACK) starts fast recovery quickly
+using time-based inferences derived from acknowledgment (ACK)
+feedback, and Tail Loss Probe (TLP) leverages RACK
+and sends a probe packet to trigger ACK feedback to avoid
+retransmission timeout (RTO) events.
+.Pp
+Compared to the widely used duplicate acknowledgment (DupAck)
+threshold approach, RACK-TLP detects losses more efficiently
+when there are application-limited flights of data, lost
+retransmissions, or data packet reordering events.
+.Pp
+It is intended to be an alternative to the
+DupAck threshold approach.
+.Sh MIB Variables
+The algorithm exposes the following scopes in the
+.Va net.inet.tcp.rack
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width indent
+.It Va net.inet.tcp.rack.misc
+Misc related controls
+.It Va net.inet.tcp.rack.features
+Feature controls
+.It Va net.inet.tcp.rack.measure
+Measure related controls
+.It Va net.inet.tcp.rack.timers
+Timer related controls
+.It Va net.inet.tcp.rack.tlp
+TLP and Rack related Controls
+.It Va net.inet.tcp.rack.timely
+Rack Timely RTT Controls
+.It Va net.inet.tcp.rack.hdwr_pacing
+Pacing related Controls
+.It Va net.inet.tcp.rack.pacing
+Pacing related Controls
+.It Va net.inet.tcp.rack.tp
+Rack tracepoint facility
+.It Va net.inet.tcp.rack.probertt
+ProbeRTT related Controls
+.It Va net.inet.tcp.rack.stats
+Rack Counters
+.It Va net.inet.tcp.rack.sack_attack
+Rack Sack Attack Counters and Controls
+.El
+.Pp
+Besides the variables within the above scopes the following
+variables are also exposed in the
+.Va net.inet.tcp.rack
+branch:
+.Bl -tag -width indent
+.It Va net.inet.tcp.rack.clear
+Clear counters
+.It Va net.inet.tcp.rack.opts
+RACK Option Stats
+.It Va net.inet.tcp.rack.outsize
+MSS send sizes
+.It Va net.inet.tcp.rack.req_measure_cnt
+If doing dynamic pacing, how many measurements
+must be in before we start pacing?
+.It Va net.inet.tcp.rack.use_pacing
+If set we use pacing, if clear we use only the original burst mitigation
+.It Va net.inet.tcp.rack.rate_sample_method
+What method should we use for rate sampling 0=high, 1=low
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr h_ertt 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr tcp_bbr 4 ,
+.Xr mod_cc 9
+.Rs
+.%A "Neal Cardwell"
+.%A "Yuchung Cheng"
+.%A "Nandita Dukkipat"
+.%A "Priyaranjan Jha"
+.%T "The RACK-TLP Loss Detection Algorithm for TCP"
+.%O "RFC 8985"
+.%D "February 2021"
+.Re
+.Rs
+.%A "Ahmed M. Abdelmoniem"
+.%A "Brahim Bensaou"
+.%T "T-RACKs: A Faster Recovery Mechanism for TCP in Data Center Networks"
+.%O "https://arxiv.org/pdf/2102.07477.pdf"
+.%D "February 2021"
+.Re
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 13.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module was written by
+.An Randall Stewart Aq Mt rrs@FreeBSD.org
+and sponsored by Netflix, Inc.
+This manual page was written by
+.An Gordon Bergling Aq Mt gbe@FreeBSD.org .
diff --git a/share/man/man4/ti.4 b/share/man/man4/ti.4
index a589ec048ebf..3209d9a0359f 100644
--- a/share/man/man4/ti.4
+++ b/share/man/man4/ti.4
@@ -299,7 +299,7 @@ driver also includes a character device interface that can be used for
additional diagnostics, configuration and debugging.
With this character
device interface, and a specially patched version of
-.Xr gdb 1 ,
+.Xr gdb 1 Pq Pa ports/devel/gdb ,
the user can
debug firmware running on the Tigon board.
.Pp
diff --git a/share/man/man4/vmd.4 b/share/man/man4/vmd.4
index 74419fd87ffe..6c49e2b83ec0 100644
--- a/share/man/man4/vmd.4
+++ b/share/man/man4/vmd.4
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 31, 2021
+.Dd October 6, 2022
.Dt VMD 4
.Os
.Sh NAME
@@ -57,6 +57,11 @@ The following tunables are settable via
or
.Xr sysctl 8 :
.Bl -tag -width indent
+.It Va hw.vmd.bypass_msi
+By default all VMD devices remap children MSI/MSI-X interrupts into their
+own. It creates additional isolation, but also complicates things due to
+sharing, etc. Fortunately some VMD devices can bypass the remapping.
+Defaults to 1.
.It Va hw.vmd.max_msi
Limits number of Message Signaled Interrupt (MSI) vectors allowed to each
child device.
diff --git a/share/man/man4/wg.4 b/share/man/man4/wg.4
new file mode 100644
index 000000000000..6d0d16d942df
--- /dev/null
+++ b/share/man/man4/wg.4
@@ -0,0 +1,218 @@
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2020 Gordon Bergling <gbe@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 11, 2022
+.Dt WG 4
+.Os
+.Sh NAME
+.Nm wg
+.Nd "WireGuard protocol driver"
+.Sh SYNOPSIS
+To load the driver as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_wg_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides Virtual Private Network (VPN) interfaces for the secure
+exchange of layer 3 traffic with other WireGuard peers using the WireGuard
+protocol.
+.Pp
+A
+.Nm
+interface recognizes one or more peers, establishes a secure tunnel with
+each on demand, and tracks each peer's UDP endpoint for exchanging encrypted
+traffic with.
+.Pp
+The interfaces can be created at runtime using the
+.Ic ifconfig Cm wg Ns Ar N Cm create
+command.
+The interface itself can be configured with
+.Xr wg 8 .
+.Pp
+The following glossary provides a brief overview of WireGuard
+terminology:
+.Bl -tag -width indent -offset 3n
+.It Peer
+Peers exchange IPv4 or IPv6 traffic over secure tunnels.
+Each
+.Nm
+interface may be configured to recognise one or more peers.
+.It Key
+Each peer uses its private key and corresponding public key to
+identify itself to others.
+A peer configures a
+.Nm
+interface with its own private key and with the public keys of its peers.
+.It Pre-shared key
+In addition to the public keys, each peer pair may be configured with a
+unique pre-shared symmetric key.
+This is used in their handshake to guard against future compromise of the
+peers' encrypted tunnel if an attack on their
+Diffie-Hellman exchange becomes feasible.
+It is optional, but recommended.
+.It Allowed IP addresses
+A single
+.Nm
+interface may maintain concurrent tunnels connecting diverse networks.
+The interface therefore implements rudimentary routing and reverse-path
+filtering functions for its tunneled traffic.
+These functions reference a set of allowed IP address ranges configured
+against each peer.
+.Pp
+The interface will route outbound tunneled traffic to the peer configured
+with the most specific matching allowed IP address range, or drop it
+if no such match exists.
+.Pp
+The interface will accept tunneled traffic only from the peer
+configured with the most specific matching allowed IP address range
+for the incoming traffic, or drop it if no such match exists.
+That is, tunneled traffic routed to a given peer cannot return through
+another peer of the same
+.Nm
+interface.
+This ensures that peers cannot spoof one another's traffic.
+.It Handshake
+Two peers handshake to mutually authenticate each other and to
+establish a shared series of secret ephemeral encryption keys.
+Either peer may initiate a handshake.
+Handshakes occur only when there is traffic to send, and recur every
+two minutes during transfers.
+.It Connectionless
+Due to the handshake behavior, there is no connected or disconnected
+state.
+.El
+.Ss Keys
+Private keys for WireGuard can be generated from any sufficiently
+secure random source.
+The Curve25519 keys and the pre-shared keys are both 32 bytes
+long and are commonly encoded in base64 for ease of use.
+.Pp
+Keys can be generated with
+.Xr wg 8
+as follows:
+.Pp
+.Dl $ wg genkey
+.Pp
+Although a valid Curve25519 key must have 5 bits set to
+specific values, this is done by the interface and so it
+will accept any random 32-byte base64 string.
+.Sh EXAMPLES
+Create a
+.Nm
+interface and set random private key.
+.Bd -literal -offset indent
+# ifconfig wg0 create
+# wg genkey | wg set wg0 listen-port 54321 private-key /dev/stdin
+.Ed
+.Pp
+Retrieve the associated public key from a
+.Nm
+interface.
+.Bd -literal -offset indent
+$ wg show wg0 public-key
+.Ed
+.Pp
+Connect to a specific endpoint using its public-key and set the allowed IP address
+.Bd -literal -offset indent
+# wg set wg0 peer '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' endpoint 10.0.1.100:54321 allowed-ips 192.168.2.100/32
+.Ed
+.Pp
+Remove a peer
+.Bd -literal -offset indent
+# wg set wg0 peer '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' remove
+.Ed
+.Sh DIAGNOSTICS
+The
+.Nm
+interface supports runtime debugging, which can be enabled with:
+.Pp
+.D1 Ic ifconfig Cm wg Ns Ar N Cm debug
+.Pp
+Some common error messages include:
+.Bl -diag
+.It "Handshake for peer X did not complete after 5 seconds, retrying"
+Peer X did not reply to our initiation packet, for example because:
+.Bl -bullet
+.It
+The peer does not have the local interface configured as a peer.
+Peers must be able to mutually authenticate each other.
+.It
+The peer endpoint IP address is incorrectly configured.
+.It
+There are firewall rules preventing communication between hosts.
+.El
+.It "Invalid handshake initiation"
+The incoming handshake packet could not be processed.
+This is likely due to the local interface not containing
+the correct public key for the peer.
+.It "Invalid initiation MAC"
+The incoming handshake initiation packet had an invalid MAC.
+This is likely because the initiation sender has the wrong public key
+for the handshake receiver.
+.It "Packet has unallowed src IP from peer X"
+After decryption, an incoming data packet has a source IP address that
+is not assigned to the allowed IPs of Peer X.
+.El
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr ip 4 ,
+.Xr ipsec 4 ,
+.Xr netintro 4 ,
+.Xr ovpn 4 ,
+.Xr ipf 5 ,
+.Xr pf.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr ipfw 8 ,
+.Xr wg 8
+.Rs
+.%T WireGuard whitepaper
+.%U https://www.wireguard.com/papers/wireguard.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 13.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Jason A. Donenfeld Aq Mt Jason@zx2c4.com ,
+.An Matt Dunwoodie Aq Mt ncon@nconroy.net ,
+and
+.An Kyle Evans Aq Mt kevans@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Gordon Bergling Aq Mt gbe@FreeBSD.org
+and is based on the
+.Ox
+manual page written by
+.An David Gwynne Aq Mt dlg@openbsd.org .
diff --git a/share/man/man4/xhci.4 b/share/man/man4/xhci.4
index d475c5e502fc..f30795e9cd02 100644
--- a/share/man/man4/xhci.4
+++ b/share/man/man4/xhci.4
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2011 Hans Petter Selasky. All rights reserved.
+.\" Copyright (c) 2011-2022 Hans Petter Selasky. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -24,13 +24,14 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 24, 2018
+.Dd October 21, 2022
.Dt XHCI 4
.Os
.Sh NAME
.Nm xhci
.Nd USB eXtensible Host Controller driver
.Sh SYNOPSIS
+.Cd "options USB_DEBUG"
.Cd "device xhci"
.Sh DESCRIPTION
The
@@ -48,7 +49,8 @@ The
.Tn XHCI
controller supports
.Tn USB
-connection speeds up to 5.0Gbps when using a USB 3.0 compliant device.
+connection speeds from 5.0Gbps and above when using USB 3.x
+compliant devices.
.Sh HARDWARE
The
.Nm
@@ -64,14 +66,37 @@ variables and
tunables:
.Bl -tag -width indent
.It Va hw.usb.xhci.debug
-Debug output level, where 0 is debugging disabled and larger values increase
-debug message verbosity.
-Default is 0.
+Set debug output level, where 0 is debugging disabled and larger
+values increase debug message verbosity.
+The default value is 0.
+.It Va hw.usb.xhci.dcepquirk
+Set to enable quirk for deconfiguration of endpoints.
+The default value is 0.
+.It Va hw.usb.xhci.ctlquirk
+Set to submit full USB control request as one job, up to 64kBytes.
+Else the USB control request will be split into multiple smaller
+requests.
+The default value is 1.
+.It Va hw.usb.xhci.streams
+Set to enable USB streams support.
+The default value is 0.
+.It Va hw.usb.xhci.route
+Set bitmap for switching EHCI ports to the XHCI controller.
+The default value is 0.
+.It Va hw.usb.xhci.polling
+Set to use a timer to poll the interrupt handler.
+The default value is 0.
+.It Va hw.usb.xhci.dma32
+Set to only use 32-bit DMA for the XHCI controller.
+The default value is 0.
+.It Va hw.usb.xhci.ctlstep
+Set to enable control endpoint status state stepping.
+The default value is 0.
.El
.Sh SEE ALSO
.Xr ehci 4 ,
.Xr ohci 4 ,
-.Xr uhci 4 ,
+.Xr uhci 4 and
.Xr usb 4
.Sh HISTORY
The