git: 58ca52f752a8 - stable/12 - Add FEATURE sysctls for ALTQ disciplines
Kristof Provost
kp at FreeBSD.org
Sat Jul 31 13:03:53 UTC 2021
The branch stable/12 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=58ca52f752a81cd670e3f7fc6f300c5667ffe4b3
commit 58ca52f752a81cd670e3f7fc6f300c5667ffe4b3
Author: Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2021-01-23 09:36:33 +0000
Commit: Kristof Provost <kp at FreeBSD.org>
CommitDate: 2021-07-31 09:12:51 +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 01aa1efef53d..f28a4383364a 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -117,6 +117,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
*/
More information about the dev-commits-src-all
mailing list