git: fd18dc70ceda - stable/12 - mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Oct 2023 10:12:32 UTC
The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fd18dc70ceda596b1007f1ec81e86c03a3b334a8 commit fd18dc70ceda596b1007f1ec81e86c03a3b334a8 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2023-10-12 10:09:39 +0000 mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.ipc.nmbclusters 2. kern.ipc.nmbjumbop 3. kern.ipc.nmbjumbo9 4. kern.ipc.nmbjumbo16 5. kern.ipc.nmbufs No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 (cherry picked from commit 6a88498e53b24d870e066c2a94910ad23dd355eb) (cherry picked from commit b1456fd6209474410c031e5e82455588e2b656c0) (cherry picked from commit 0007ba082c3353f0c545e5dcf328ce30d74c5ab7) --- sys/kern/kern_mbuf.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index d9a7f30d6557..0130f8f2a324 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -176,8 +176,9 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, CTLTYPE_INT|CTLFLAG_RW, -&nmbclusters, 0, sysctl_nmbclusters, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbclusters, 0, sysctl_nmbclusters, "IU", "Maximum number of mbuf clusters allowed"); static int @@ -197,8 +198,9 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbop, 0, sysctl_nmbjumbop, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbop, 0, sysctl_nmbjumbop, "IU", "Maximum number of mbuf page size jumbo clusters allowed"); static int @@ -218,8 +220,9 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", "Maximum number of mbuf 9k jumbo clusters allowed"); static int @@ -239,8 +242,9 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", "Maximum number of mbuf 16k jumbo clusters allowed"); static int @@ -260,8 +264,9 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, CTLTYPE_INT|CTLFLAG_RW, -&nmbufs, 0, sysctl_nmbufs, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbufs, 0, sysctl_nmbufs, "IU", "Maximum number of mbufs allowed"); /*