Introduce stats(3), a flexible statistics gathering API.
This provides a framework for the kernel subsystem, such as the IP
stack, to define a template describing a set of "variables of
interest" (data to feed into the framework, for example the round
trip time value measured on a TCP connection) and the intended way
for the framework to maintain them (for example the maximum, or
sum, or a histogram, or a combination thereof). Afterwards the
kernel subsystem feeds it the raw data, and the framework maintains
them inside a subsystem-provided, opaque statsblobs.
On the userspace side, this provides the mechanism to extract the
statistical information of choice from the blob.
See the stats(3) manual page for details.
This will be used by the upcoming TCP statistics gathering code.
This depends on both https://reviews.freebsd.org/D20324
It's disabled for now, except for NOTES; it's expected
to be enabled in amd64 GENERIC after a cooldown period.
Sponsored By: Klara Inc, Netflix
Obtained from: Netflix