aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/stats.h
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2019-12-02 20:58:04 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2019-12-02 20:58:04 +0000
commitadc56f5a383771f594829b7db9c263b6f0dcf1bd (patch)
tree1767a0c4a3c4257add557b9ae6dbf666df6b4926 /sys/sys/stats.h
parent79c1428ed655778475f020df2932d0b2f1c648b1 (diff)
downloadsrc-adc56f5a383771f594829b7db9c263b6f0dcf1bd.tar.gz
src-adc56f5a383771f594829b7db9c263b6f0dcf1bd.zip
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. Reviewed by: thj Tested by: thj Obtained from: Netflix Relnotes: yes Sponsored by: Klara Inc, Netflix Differential Revision: https://reviews.freebsd.org/D20655
Notes
Notes: svn path=/head/; revision=355304
Diffstat (limited to 'sys/sys/stats.h')
-rw-r--r--sys/sys/stats.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/stats.h b/sys/sys/stats.h
index 30b1073cfa99..8f1c8edee5aa 100644
--- a/sys/sys/stats.h
+++ b/sys/sys/stats.h
@@ -58,6 +58,9 @@
#define _SYS_STATS_H_
#include <sys/limits.h>
+#ifdef DIAGNOSTIC
+#include <sys/tree.h>
+#endif
#ifndef _KERNEL
/*