Make use of the stats(3) framework in the TCP stack.
This makes it possible to retrieve per-connection statistical
information such as the receive window size, RTT, or goodput,
using a newly added TCP_STATS getsockopt(3) option, and extract them
using the stats_voistat_fetch(3) API.
See the net/tcprtt port for an example consumer of this API.
Compared to the existing TCP_INFO system, the main differences are that
this mechanism is easy to extend without breaking ABI, and provides
statistical information instead of raw "snapshots" of values at a given
point in time. stats(3) is more generic and can be used in both
userland and the kernel.
This work depends on:
the stats(3) framework:
https://reviews.freebsd.org/D20477
The qmath(3) macros:
https://reviews.freebsd.org/D20116
and the Array-base Red Black Tree implementation:
https://reviews.freebsd.org/D20324
An example consumer tool for using these TCP stats is here:
https://reviews.freebsd.org/D20656.
Sponsored By: Klara Inc, Netflix
Obtained from: Netflix