git: ce95ba8ae530 - stable/13 - tcp: Add CTLFLAG_VNET flag to some sysctls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Oct 2025 16:44:42 UTC
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=ce95ba8ae530e47103d765e76cc3547613ee22ce
commit ce95ba8ae530e47103d765e76cc3547613ee22ce
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-24 01:16:13 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-10-04 16:43:26 +0000
tcp: Add CTLFLAG_VNET flag to some sysctls
The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo
are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET
flag to them since they are per-vnet sysctls.
This change does not have any impact on reading the two sysctls, but
`sysctl -ANV net.inet.tcp.hostcache` will report them correctly.
Reviewed by: tuexen, #transport, #network
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52693
(cherry picked from commit b1f96169cfb50a7b65aee115b2c9ad2f00797bbf)
(cherry picked from commit 032918dfd155936a79847f17ac355439e6b59027)
(cherry picked from commit ccbc722a19450df2981049777d4930deae94a840)
---
sys/netinet/tcp_hostcache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 6e987fd4b521..cde2157ec237 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -164,12 +164,12 @@ SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_VNET | CTLFLAG_RW,
"Expire all entries on next purge run");
SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list,
- CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+ CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
0, 0, sysctl_tcp_hc_list, "A",
"List of all hostcache entries");
SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo,
- CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+ CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
0, 0, sysctl_tcp_hc_histo, "A",
"Print a histogram of hostcache hashbucket utilization");