Date: Sat, 31 Jul 2021 13:03:51 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b0e7f371cde1 - stable/13 - Add FEATURE sysctls for ALTQ disciplines Message-ID: <202107311303.16VD3pJA066308@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e7f371cde199895a9071046e951beb38b1f4b4 commit b0e7f371cde199895a9071046e951beb38b1f4b4 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-01-23 09:36:33 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-07-31 08:12:01 +0000 Add FEATURE sysctls for ALTQ disciplines This will allow userspace to more easily figure out if ALTQ is built into the kernel and what disciplines are supported. Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28302 (cherry picked from commit e111d79806fe3652bc85593ca77ee1b4ff85498d) --- sys/net/altq/altq_subr.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index ba1d3af5f5fd..609c18482845 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -114,6 +114,38 @@ static struct ip4_frag *ip4f_alloc(void); static void ip4f_free(struct ip4_frag *); #endif /* ALTQ3_CLFIER_COMPAT */ +#ifdef ALTQ +SYSCTL_NODE(_kern_features, OID_AUTO, altq, CTLFLAG_RD | CTLFLAG_CAPRD, 0, + "ALTQ packet queuing"); + +#define ALTQ_FEATURE(name, desc) \ + SYSCTL_INT_WITH_LABEL(_kern_features_altq, OID_AUTO, name, \ + CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, 1, \ + desc, "feature") + +#ifdef ALTQ_CBQ +ALTQ_FEATURE(cbq, "ATLQ Class Based Queuing discipline"); +#endif +#ifdef ALTQ_CODEL +ALTQ_FEATURE(codel, "ALTQ Controlled Delay discipline"); +#endif +#ifdef ALTQ_RED +ALTQ_FEATURE(red, "ALTQ Random Early Detection discipline"); +#endif +#ifdef ALTQ_RIO +ALTQ_FEATURE(rio, "ALTQ Random Early Drop discipline"); +#endif +#ifdef ALTQ_HFSC +ALTQ_FEATURE(hfsc, "ALTQ Hierarchical Packet Scheduler discipline"); +#endif +#ifdef ALTQ_PRIQ +ALTQ_FEATURE(priq, "ATLQ Priority Queuing discipline"); +#endif +#ifdef ALTQ_FAIRQ +ALTQ_FEATURE(fairq, "ALTQ Fair Queuing discipline"); +#endif +#endif + /* * alternate queueing support routines */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107311303.16VD3pJA066308>