Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/altq expose CBQ_MAXPRI to userland
details: https://anonhg.NetBSD.org/src/rev/93e0606b312c
branches: trunk
changeset: 550767:93e0606b312c
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Aug 20 23:32:25 2003 +0000
description:
expose CBQ_MAXPRI to userland
diffstat:
sys/altq/altq_cbq.c | 6 +++---
sys/altq/altq_cbq.h | 3 ++-
sys/altq/altq_rmclass.h | 5 +++--
3 files changed, 8 insertions(+), 6 deletions(-)
diffs (70 lines):
diff -r 1d0749c25c1c -r 93e0606b312c sys/altq/altq_cbq.c
--- a/sys/altq/altq_cbq.c Wed Aug 20 22:58:22 2003 +0000
+++ b/sys/altq/altq_cbq.c Wed Aug 20 23:32:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cbq.c,v 1.6 2002/10/07 02:57:39 itojun Exp $ */
+/* $NetBSD: altq_cbq.c,v 1.7 2003/08/20 23:32:25 itojun Exp $ */
/* $KAME: altq_cbq.c,v 1.11 2002/10/04 14:24:09 kjc Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.6 2002/10/07 02:57:39 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.7 2003/08/20 23:32:25 itojun Exp $");
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
@@ -112,7 +112,7 @@
return (EBADF);
/* check parameters */
- if (acp->cbq_class.priority >= RM_MAXPRIO ||
+ if (acp->cbq_class.priority >= CBQ_MAXPRI ||
acp->cbq_class.maxq > CBQ_MAXQSIZE)
return (EINVAL);
diff -r 1d0749c25c1c -r 93e0606b312c sys/altq/altq_cbq.h
--- a/sys/altq/altq_cbq.h Wed Aug 20 22:58:22 2003 +0000
+++ b/sys/altq/altq_cbq.h Wed Aug 20 23:32:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cbq.h,v 1.4 2002/07/18 11:59:06 wiz Exp $ */
+/* $NetBSD: altq_cbq.h,v 1.5 2003/08/20 23:32:25 itojun Exp $ */
/* $KAME: altq_cbq.h,v 1.5 2000/12/02 13:44:40 kjc Exp $ */
/*
@@ -99,6 +99,7 @@
#define CBQCLF_CLASSMASK 0xf000 /* class mask */
#define CBQ_MAXQSIZE 200
+#define CBQ_MAXPRI RM_MAXPRIO
struct cbq_add_class {
struct cbq_interface cbq_iface;
diff -r 1d0749c25c1c -r 93e0606b312c sys/altq/altq_rmclass.h
--- a/sys/altq/altq_rmclass.h Wed Aug 20 22:58:22 2003 +0000
+++ b/sys/altq/altq_rmclass.h Wed Aug 20 23:32:25 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_rmclass.h,v 1.3 2002/03/05 04:12:57 itojun Exp $ */
+/* $NetBSD: altq_rmclass.h,v 1.4 2003/08/20 23:32:25 itojun Exp $ */
/* $KAME: altq_rmclass.h,v 1.7 2002/01/11 07:32:54 kjc Exp $ */
/*
@@ -45,6 +45,8 @@
extern "C" {
#endif
+#define RM_MAXPRIO 8 /* Max priority */
+
#ifdef _KERNEL
typedef struct mbuf mbuf_t;
@@ -113,7 +115,6 @@
#else
#define RM_MAXQUEUED 16 /* Max number of packets downstream of CBQ */
#endif
-#define RM_MAXPRIO 8 /* Max priority */
#define RM_MAXQUEUE 64 /* Max queue length */
#define RM_FILTER_GAIN 5 /* log2 of gain, e.g., 5 => 31/32 */
#define RM_POWER (1 << RM_FILTER_GAIN)
Home |
Main Index |
Thread Index |
Old Index