aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2025-06-17 16:46:41 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2025-06-17 16:52:51 +0000
commitb59753f1d55da6c6d4b73252444212e6895ce913 (patch)
tree64fc60aede1676e1b172495ca7f0ba06749613c9
parent2d300d376d5b974999d6a2471eef7565877e7508 (diff)
tcp: provide a useful comment for struct tcpstat
-rw-r--r--sys/netinet/tcp_var.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index d8822c40b17e..da4094b8ea4c 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -927,9 +927,12 @@ struct in_conninfo;
+ (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
/*
- * TCP statistics.
- * Many of these should be kept per connection,
- * but that's inconvenient at the moment.
+ * Global (per-VNET) TCP statistics. The below structure represents what we
+ * export to the userland, but in the kernel we have an array of counter_u64_t
+ * with as many elements as there are members in the structure. The counters
+ * shall be increased by TCPSTAT_INC() or KMOD_TCPSTAT_INC(). Adding new a
+ * new counter also requires adding corresponding SDT probes into in_kdtrace.h
+ * and into in_kdtrace.c.
*/
struct tcpstat {
uint64_t tcps_connattempt; /* connections initiated */