aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_hpts.c
diff options
context:
space:
mode:
authorPawel Biernacki <kaktus@FreeBSD.org>2020-02-26 14:26:36 +0000
committerPawel Biernacki <kaktus@FreeBSD.org>2020-02-26 14:26:36 +0000
commit7029da5c36f2d3cf6bb6c81bf551229f416399e8 (patch)
tree53cae9da1371117a3ac21d0d0f3f030a692807ae /sys/netinet/tcp_hpts.c
parentd7313dc6f5fcab29946951936597772dfff6a4be (diff)
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
Notes
Notes: svn path=/head/; revision=358333
Diffstat (limited to 'sys/netinet/tcp_hpts.c')
-rw-r--r--sys/netinet/tcp_hpts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c
index f25e4ba2572f..6f0b1c762ecb 100644
--- a/sys/netinet/tcp_hpts.c
+++ b/sys/netinet/tcp_hpts.c
@@ -203,7 +203,8 @@ static void tcp_init_hptsi(void *st);
int32_t tcp_min_hptsi_time = DEFAULT_MIN_SLEEP;
static int32_t tcp_hpts_callout_skip_swi = 0;
-SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hpts, CTLFLAG_RW, 0, "TCP Hpts controls");
+SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hpts, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+ "TCP Hpts controls");
#define timersub(tvp, uvp, vvp) \
do { \
@@ -293,7 +294,7 @@ sysctl_net_inet_tcp_hpts_max_sleep(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_net_inet_tcp_hpts, OID_AUTO, maxsleep,
- CTLTYPE_UINT | CTLFLAG_RW,
+ CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
&hpts_sleep_max, 0,
&sysctl_net_inet_tcp_hpts_max_sleep, "IU",
"Maximum time hpts will sleep");
@@ -1903,7 +1904,7 @@ tcp_init_hptsi(void *st)
SYSCTL_STATIC_CHILDREN(_net_inet_tcp_hpts),
OID_AUTO,
unit,
- CTLFLAG_RW, 0,
+ CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"");
SYSCTL_ADD_INT(&hpts->hpts_ctx,
SYSCTL_CHILDREN(hpts->hpts_root),