diff options
author | Kristof Provost <kp@FreeBSD.org> | 2021-01-23 09:36:33 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2021-07-31 08:12:01 +0000 |
commit | b0e7f371cde199895a9071046e951beb38b1f4b4 (patch) | |
tree | 05fdfd5c13c040d6d28bfe9689e22d81660f5166 /sys/net/altq/altq_subr.c | |
parent | b96680d9ca08c1001868778ff9764b93e20f59be (diff) | |
download | src-b0e7f371cde199895a9071046e951beb38b1f4b4.tar.gz src-b0e7f371cde199895a9071046e951beb38b1f4b4.zip |
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)
Diffstat (limited to 'sys/net/altq/altq_subr.c')
-rw-r--r-- | sys/net/altq/altq_subr.c | 32 |
1 files changed, 32 insertions, 0 deletions
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 */ |