summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/altq/altq_cbq.c44
-rw-r--r--sys/altq/altq_cbq.h14
-rw-r--r--sys/altq/altq_cdnr.c4
-rw-r--r--sys/altq/altq_cdnr.h4
-rw-r--r--sys/altq/altq_hfsc.c4
-rw-r--r--sys/altq/altq_hfsc.h8
-rw-r--r--sys/altq/altq_priq.c6
-rw-r--r--sys/altq/altq_priq.h8
-rw-r--r--sys/altq/altq_red.c14
-rw-r--r--sys/altq/altq_red.h78
-rw-r--r--sys/altq/altq_rio.c55
-rw-r--r--sys/altq/altq_rio.h94
-rw-r--r--sys/altq/altq_rmclass.c282
-rw-r--r--sys/altq/altq_rmclass.h6
-rw-r--r--sys/altq/altq_subr.c4
-rw-r--r--sys/altq/if_altq.h4
16 files changed, 268 insertions, 361 deletions
diff --git a/sys/altq/altq_cbq.c b/sys/altq/altq_cbq.c
index 719eeb59d9a..215f73e8c0d 100644
--- a/sys/altq/altq_cbq.c
+++ b/sys/altq/altq_cbq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_cbq.c,v 1.8 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_cbq.c,v 1.9 2002/12/16 17:27:19 henning Exp $ */
/* $KAME: altq_cbq.c,v 1.9 2000/12/14 08:12:45 thorpej Exp $ */
/*
@@ -49,16 +49,16 @@
/*
* Forward Declarations.
*/
-static int cbq_class_destroy(cbq_state_t *, struct rm_class *);
+static int cbq_class_destroy(cbq_state_t *, struct rm_class *);
static struct rm_class *clh_to_clp(cbq_state_t *, u_int32_t);
-static int cbq_clear_interface(cbq_state_t *);
-static int cbq_request(struct ifaltq *, int, void *);
-static int cbq_enqueue(struct ifaltq *, struct mbuf *,
- struct altq_pktattr *);
-static struct mbuf *cbq_dequeue(struct ifaltq *, int);
-static void cbqrestart(struct ifaltq *);
-static void get_class_stats(class_stats_t *, struct rm_class *);
-static void cbq_purge(cbq_state_t *);
+static int cbq_clear_interface(cbq_state_t *);
+static int cbq_request(struct ifaltq *, int, void *);
+static int cbq_enqueue(struct ifaltq *, struct mbuf *,
+ struct altq_pktattr *);
+static struct mbuf *cbq_dequeue(struct ifaltq *, int);
+static void cbqrestart(struct ifaltq *);
+static void get_class_stats(class_stats_t *, struct rm_class *);
+static void cbq_purge(cbq_state_t *);
/*
* int
@@ -187,14 +187,14 @@ get_class_stats(statsp, cl)
class_stats_t *statsp;
struct rm_class *cl;
{
- statsp->xmit_cnt = cl->stats_.xmit_cnt;
- statsp->drop_cnt = cl->stats_.drop_cnt;
+ statsp->xmit_cnt = cl->stats_.xmit_cnt;
+ statsp->drop_cnt = cl->stats_.drop_cnt;
statsp->over = cl->stats_.over;
- statsp->borrows = cl->stats_.borrows;
- statsp->overactions = cl->stats_.overactions;
- statsp->delays = cl->stats_.delays;
+ statsp->borrows = cl->stats_.borrows;
+ statsp->overactions = cl->stats_.overactions;
+ statsp->delays = cl->stats_.delays;
- statsp->depth = cl->depth_;
+ statsp->depth = cl->depth_;
statsp->priority = cl->pri_;
statsp->maxidle = cl->maxidle_;
statsp->minidle = cl->minidle_;
@@ -235,7 +235,7 @@ int
cbq_add_altq(struct pf_altq *a)
{
cbq_state_t *cbqp;
- struct ifnet *ifp;
+ struct ifnet *ifp;
if ((ifp = ifunit(a->ifname)) == NULL)
return (EINVAL);
@@ -247,7 +247,7 @@ cbq_add_altq(struct pf_altq *a)
if (cbqp == NULL)
return (ENOMEM);
bzero(cbqp, sizeof(cbq_state_t));
- CALLOUT_INIT(&cbqp->cbq_callout);
+ CALLOUT_INIT(&cbqp->cbq_callout);
cbqp->cbq_qlen = 0;
cbqp->ifnp.ifq_ = &ifp->if_snd; /* keep the ifq */
@@ -260,7 +260,7 @@ cbq_add_altq(struct pf_altq *a)
int
cbq_remove_altq(struct pf_altq *a)
{
- cbq_state_t *cbqp;
+ cbq_state_t *cbqp;
if ((cbqp = a->altq_disc) == NULL)
return (EINVAL);
@@ -527,8 +527,8 @@ cbq_dequeue(ifq, op)
struct ifaltq *ifq;
int op;
{
- cbq_state_t *cbqp = (cbq_state_t *)ifq->altq_disc;
- struct mbuf *m;
+ cbq_state_t *cbqp = (cbq_state_t *)ifq->altq_disc;
+ struct mbuf *m;
m = rmc_dequeue_next(&cbqp->ifnp, op);
@@ -574,7 +574,7 @@ static void cbq_purge(cbqp)
cbq_state_t *cbqp;
{
struct rm_class *cl;
- int i;
+ int i;
for (i = 0; i < CBQ_MAX_CLASSES; i++)
if ((cl = cbqp->cbq_class_tbl[i]) != NULL)
diff --git a/sys/altq/altq_cbq.h b/sys/altq/altq_cbq.h
index b6fc350686b..b6d59d2d202 100644
--- a/sys/altq/altq_cbq.h
+++ b/sys/altq/altq_cbq.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_cbq.h,v 1.5 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_cbq.h,v 1.6 2002/12/16 17:27:19 henning Exp $ */
/* $KAME: altq_cbq.h,v 1.5 2000/12/02 13:44:40 kjc Exp $ */
/*
@@ -69,7 +69,7 @@ extern "C" {
#define CBQCLF_CTLCLASS 0x4000 /* control class */
#define CBQCLF_CLASSMASK 0xf000 /* class mask */
-#define CBQ_MAXQSIZE 200
+#define CBQ_MAXQSIZE 200
typedef struct _cbq_class_stats_ {
u_int32_t handle;
@@ -103,21 +103,21 @@ typedef struct _cbq_class_stats_ {
/*
* Define macros only good for kernel drivers and modules.
*/
-#define CBQ_WATCHDOG (HZ / 20)
+#define CBQ_WATCHDOG (HZ / 20)
#define CBQ_TIMEOUT 10
#define CBQ_LS_TIMEOUT (20 * hz / 1000)
-#define CBQ_MAX_CLASSES 256
+#define CBQ_MAX_CLASSES 256
/*
* Define State structures.
*/
typedef struct cbqstate {
- int cbq_qlen; /* # of packets in cbq */
+ int cbq_qlen; /* # of packets in cbq */
struct rm_class *cbq_class_tbl[CBQ_MAX_CLASSES];
- struct rm_ifdat ifnp;
- struct callout cbq_callout; /* for timeouts */
+ struct rm_ifdat ifnp;
+ struct callout cbq_callout; /* for timeouts */
} cbq_state_t;
#endif /* _KERNEL */
diff --git a/sys/altq/altq_cdnr.c b/sys/altq/altq_cdnr.c
index 68747472dc3..f26e66626c1 100644
--- a/sys/altq/altq_cdnr.c
+++ b/sys/altq/altq_cdnr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_cdnr.c,v 1.6 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_cdnr.c,v 1.7 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_cdnr.c,v 1.8 2000/12/14 08:12:45 thorpej Exp $ */
/*
@@ -519,7 +519,7 @@ element_destroy(cb)
/*
* internal representation of token bucket parameters
- * rate: byte_per_unittime << 32
+ * rate: byte_per_unittime << 32
* (((bits_per_sec) / 8) << 32) / machclk_freq
* depth: byte << 32
*
diff --git a/sys/altq/altq_cdnr.h b/sys/altq/altq_cdnr.h
index 9cf388b917b..c15d8033f31 100644
--- a/sys/altq/altq_cdnr.h
+++ b/sys/altq/altq_cdnr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_cdnr.h,v 1.3 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_cdnr.h,v 1.4 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_cdnr.h,v 1.6 2000/12/14 08:12:45 thorpej Exp $ */
/*
@@ -63,7 +63,7 @@ struct tc_action {
#define tca_next tca_un.un_next
#define TCACODE_NONE 0 /* action is not set */
-#define TCACODE_PASS 1 /* pass this packet */
+#define TCACODE_PASS 1 /* pass this packet */
#define TCACODE_DROP 2 /* discard this packet */
#define TCACODE_RETURN 3 /* do not process this packet */
#define TCACODE_MARK 4 /* mark dscp */
diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c
index f29989b476f..f02b5e9de57 100644
--- a/sys/altq/altq_hfsc.c
+++ b/sys/altq/altq_hfsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_hfsc.c,v 1.8 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_hfsc.c,v 1.9 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_hfsc.c,v 1.17 2002/11/29 07:48:33 kjc Exp $ */
/*
@@ -567,7 +567,7 @@ hfsc_class_destroy(cl)
/*
* hfsc_nextclass returns the next class in the tree.
* usage:
- * for (cl = hif->hif_rootclass; cl != NULL; cl = hfsc_nextclass(cl))
+ * for (cl = hif->hif_rootclass; cl != NULL; cl = hfsc_nextclass(cl))
* do_something;
*/
static struct hfsc_class *
diff --git a/sys/altq/altq_hfsc.h b/sys/altq/altq_hfsc.h
index 93f17eca30b..0f0f328195e 100644
--- a/sys/altq/altq_hfsc.h
+++ b/sys/altq/altq_hfsc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_hfsc.h,v 1.3 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_hfsc.h,v 1.4 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_hfsc.h,v 1.8 2002/11/29 04:36:23 kjc Exp $ */
/*
@@ -100,15 +100,15 @@ struct hfsc_classstats {
u_int qlimit;
struct pktcntr xmit_cnt;
struct pktcntr drop_cnt;
- u_int period;
+ u_int period;
u_int vtperiod; /* vt period sequence no */
u_int parentperiod; /* parent's vt period seqno */
int nactive; /* number of active children */
/* red and rio related info */
- int qtype;
- struct redstats red[3];
+ int qtype;
+ struct redstats red[3];
};
#ifdef _KERNEL
diff --git a/sys/altq/altq_priq.c b/sys/altq/altq_priq.c
index 9d665e5f90d..454c0175119 100644
--- a/sys/altq/altq_priq.c
+++ b/sys/altq/altq_priq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_priq.c,v 1.7 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_priq.c,v 1.8 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_priq.c,v 1.1 2000/10/18 09:15:23 kjc Exp $ */
/*
* Copyright (C) 2000
@@ -84,8 +84,8 @@ priq_pfattach(struct pf_altq *a)
int
priq_add_altq(struct pf_altq *a)
{
- struct priq_if *pif;
- struct ifnet *ifp;
+ struct priq_if *pif;
+ struct ifnet *ifp;
if ((ifp = ifunit(a->ifname)) == NULL)
return (EINVAL);
diff --git a/sys/altq/altq_priq.h b/sys/altq/altq_priq.h
index b1eb873a2df..dc6e5a4be5d 100644
--- a/sys/altq/altq_priq.h
+++ b/sys/altq/altq_priq.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_priq.h,v 1.3 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_priq.h,v 1.4 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_priq.h,v 1.1 2000/10/18 09:15:23 kjc Exp $ */
/*
* Copyright (C) 2000-2002
@@ -55,13 +55,13 @@ struct priq_classstats {
u_int qlength;
u_int qlimit;
- u_int period;
+ u_int period;
struct pktcntr xmitcnt; /* transmitted packet counter */
struct pktcntr dropcnt; /* dropped packet counter */
/* red and rio related info */
- int qtype;
- struct redstats red[3]; /* rio has 3 red stats */
+ int qtype;
+ struct redstats red[3]; /* rio has 3 red stats */
};
#ifdef _KERNEL
diff --git a/sys/altq/altq_red.c b/sys/altq/altq_red.c
index 9adcf19a008..f0eb8f71a91 100644
--- a/sys/altq/altq_red.c
+++ b/sys/altq/altq_red.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_red.c,v 1.8 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_red.c,v 1.9 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_red.c,v 1.10 2002/04/03 05:38:51 kjc Exp $ */
/*
@@ -156,12 +156,12 @@ static int default_inv_pmax = INV_P_MAX;
*/
red_t *
red_alloc(weight, inv_pmax, th_min, th_max, flags, pkttime)
- int weight, inv_pmax, th_min, th_max;
- int flags, pkttime;
+ int weight, inv_pmax, th_min, th_max;
+ int flags, pkttime;
{
- red_t *rp;
- int w, i;
- int npkts_per_sec;
+ red_t *rp;
+ int w, i;
+ int npkts_per_sec;
MALLOC(rp, red_t *, sizeof(red_t), M_DEVBUF, M_WAITOK);
if (rp == NULL)
@@ -254,7 +254,7 @@ red_getstats(rp, sp)
red_t *rp;
struct redstats *sp;
{
- sp->q_avg = rp->red_avg >> rp->red_wshift;
+ sp->q_avg = rp->red_avg >> rp->red_wshift;
sp->xmit_cnt = rp->red_stats.xmit_cnt;
sp->drop_cnt = rp->red_stats.drop_cnt;
sp->drop_forced = rp->red_stats.drop_forced;
diff --git a/sys/altq/altq_red.h b/sys/altq/altq_red.h
index 65e9355ccad..2e104e2a4ab 100644
--- a/sys/altq/altq_red.h
+++ b/sys/altq/altq_red.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_red.h,v 1.4 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_red.h,v 1.5 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_red.h,v 1.5 2000/12/14 08:12:46 thorpej Exp $ */
/*
@@ -43,9 +43,9 @@
* disciplines (e.g., CBQ)
*/
struct redparams {
- int th_min; /* red min threshold */
- int th_max; /* red max threshold */
- int inv_pmax; /* inverse of max drop probability */
+ int th_min; /* red min threshold */
+ int th_max; /* red max threshold */
+ int inv_pmax; /* inverse of max drop probability */
};
struct redstats {
@@ -61,37 +61,37 @@ struct redstats {
/* weight table structure for idle time calibration */
struct wtab {
- struct wtab *w_next;
- int w_weight;
- int w_param_max;
- int w_refcount;
- int32_t w_tab[32];
+ struct wtab *w_next;
+ int w_weight;
+ int w_param_max;
+ int w_refcount;
+ int32_t w_tab[32];
};
typedef struct red {
- int red_pkttime; /* average packet time in micro sec
- used for idle calibration */
- int red_flags; /* red flags */
+ int red_pkttime; /* average packet time in micro sec
+ used for idle calibration */
+ int red_flags; /* red flags */
/* red parameters */
- int red_weight; /* weight for EWMA */
- int red_inv_pmax; /* inverse of max drop probability */
- int red_thmin; /* red min threshold */
- int red_thmax; /* red max threshold */
+ int red_weight; /* weight for EWMA */
+ int red_inv_pmax; /* inverse of max drop probability */
+ int red_thmin; /* red min threshold */
+ int red_thmax; /* red max threshold */
/* variables for internal use */
- int red_wshift; /* log(red_weight) */
- int red_thmin_s; /* th_min scaled by avgshift */
- int red_thmax_s; /* th_max scaled by avgshift */
- int red_probd; /* drop probability denominator */
-
- int red_avg; /* queue length average scaled by avgshift */
- int red_count; /* packet count since the last dropped/marked
- packet */
- int red_idle; /* queue was empty */
- int red_old; /* avg is above th_min */
- struct wtab *red_wtab; /* weight table */
- struct timeval red_last; /* timestamp when the queue becomes idle */
+ int red_wshift; /* log(red_weight) */
+ int red_thmin_s; /* th_min scaled by avgshift */
+ int red_thmax_s; /* th_max scaled by avgshift */
+ int red_probd; /* drop probability denominator */
+
+ int red_avg; /* queue len avg scaled by avgshift */
+ int red_count; /* packet count since last dropped/
+ marked packet */
+ int red_idle; /* queue was empty */
+ int red_old; /* avg is above th_min */
+ struct wtab *red_wtab; /* weight table */
+ struct timeval red_last; /* time when the queue becomes idle */
struct {
struct pktcntr xmit_cnt;
@@ -107,17 +107,17 @@ typedef struct red {
#define DTYPE_FORCED 1 /* a "forced" drop */
#define DTYPE_EARLY 2 /* an "unforced" (early) drop */
-extern red_t *red_alloc(int, int, int, int, int, int);
-extern void red_destroy(red_t *);
-extern void red_getstats(red_t *, struct redstats *);
-extern int red_addq(red_t *, class_queue_t *, struct mbuf *,
- struct altq_pktattr *);
-extern struct mbuf *red_getq(red_t *, class_queue_t *);
-extern int drop_early(int, int, int);
-extern int mark_ecn(struct mbuf *, struct altq_pktattr *, int);
-extern struct wtab *wtab_alloc(int);
-extern int wtab_destroy(struct wtab *);
-extern int32_t pow_w(struct wtab *, int);
+extern red_t *red_alloc(int, int, int, int, int, int);
+extern void red_destroy(red_t *);
+extern void red_getstats(red_t *, struct redstats *);
+extern int red_addq(red_t *, class_queue_t *, struct mbuf *,
+ struct altq_pktattr *);
+extern struct mbuf *red_getq(red_t *, class_queue_t *);
+extern int drop_early(int, int, int);
+extern int mark_ecn(struct mbuf *, struct altq_pktattr *, int);
+extern struct wtab *wtab_alloc(int);
+extern int wtab_destroy(struct wtab *);
+extern int32_t pow_w(struct wtab *, int);
#endif /* _KERNEL */
diff --git a/sys/altq/altq_rio.c b/sys/altq/altq_rio.c
index eafa84aaf26..2b568b43c02 100644
--- a/sys/altq/altq_rio.c
+++ b/sys/altq/altq_rio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_rio.c,v 1.7 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_rio.c,v 1.8 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_rio.c,v 1.8 2000/12/14 08:12:46 thorpej Exp $ */
/*
@@ -138,9 +138,9 @@
#define TV_DELTA(a, b, delta) { \
register int xxs; \
\
- delta = (a)->tv_usec - (b)->tv_usec; \
- if ((xxs = (a)->tv_sec - (b)->tv_sec) != 0) { \
- if (xxs < 0) { \
+ delta = (a)->tv_usec - (b)->tv_usec; \
+ if ((xxs = (a)->tv_sec - (b)->tv_sec) != 0) { \
+ if (xxs < 0) { \
delta = 60000000; \
} else if (xxs > 4) { \
if (xxs > 60) \
@@ -166,14 +166,11 @@ static struct redparams default_rio_params[RIO_NDROPPREC] = {
static int dscp2index(u_int8_t);
rio_t *
-rio_alloc(weight, params, flags, pkttime)
- int weight;
- struct redparams *params;
- int flags, pkttime;
+rio_alloc(int weight, struct redparams *params, int flags, int pkttime)
{
- rio_t *rp;
- int w, i;
- int npkts_per_sec;
+ rio_t *rp;
+ int w, i;
+ int npkts_per_sec;
MALLOC(rp, rio_t *, sizeof(rio_t), M_DEVBUF, M_WAITOK);
if (rp == NULL)
@@ -259,19 +256,16 @@ rio_alloc(weight, params, flags, pkttime)
}
void
-rio_destroy(rp)
- rio_t *rp;
+rio_destroy(rio_t *rp)
{
wtab_destroy(rp->rio_wtab);
FREE(rp, M_DEVBUF);
}
void
-rio_getstats(rp, sp)
- rio_t *rp;
- struct redstats *sp;
+rio_getstats(rio_t *rp, struct redstats *sp)
{
- int i;
+ int i;
for (i = 0; i < RIO_NDROPPREC; i++) {
bcopy(&rp->q_stats[i], sp, sizeof(struct redstats));
@@ -288,7 +282,7 @@ rio_getstats(rp, sp)
static int
dscp2index(u_int8_t dscp)
{
- int dpindex = dscp & AF_DROPPRECMASK;
+ int dpindex = dscp & AF_DROPPRECMASK;
if (dpindex == 0)
return (0);
@@ -310,17 +304,14 @@ dscp2index(u_int8_t dscp)
#endif
int
-rio_addq(rp, q, m, pktattr)
- rio_t *rp;
- class_queue_t *q;
- struct mbuf *m;
- struct altq_pktattr *pktattr;
+rio_addq(rio_t *rp, class_queue_t *q, struct mbuf *m,
+ struct altq_pktattr *pktattr)
{
- int avg, droptype;
- u_int8_t dsfield, odsfield;
- int dpindex, i, n, t;
- struct timeval now;
- struct dropprec_state *prec;
+ int avg, droptype;
+ u_int8_t dsfield, odsfield;
+ int dpindex, i, n, t;
+ struct timeval now;
+ struct dropprec_state *prec;
dsfield = odsfield = read_dsfield(m, pktattr);
dpindex = dscp2index(dsfield);
@@ -426,12 +417,10 @@ rio_addq(rp, q, m, pktattr)
}
struct mbuf *
-rio_getq(rp, q)
- rio_t *rp;
- class_queue_t *q;
+rio_getq(rio_t *rp, class_queue_t *q)
{
- struct mbuf *m;
- int dpindex, i;
+ struct mbuf *m;
+ int dpindex, i;
if ((m = _getq(q)) == NULL)
return NULL;
diff --git a/sys/altq/altq_rio.h b/sys/altq/altq_rio.h
index 20332b23415..91e547db97f 100644
--- a/sys/altq/altq_rio.h
+++ b/sys/altq/altq_rio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_rio.h,v 1.4 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_rio.h,v 1.5 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_rio.h,v 1.5 2000/12/14 08:12:46 thorpej Exp $ */
/*
@@ -43,24 +43,24 @@ struct rio_interface {
};
struct rio_stats {
- struct rio_interface iface;
- int q_len[RIO_NDROPPREC];
- struct redstats q_stats[RIO_NDROPPREC];
+ struct rio_interface iface;
+ int q_len[RIO_NDROPPREC];
+ struct redstats q_stats[RIO_NDROPPREC];
/* static red parameters */
- int q_limit;
- int weight;
- int flags;
- struct redparams q_params[RIO_NDROPPREC];
+ int q_limit;
+ int weight;
+ int flags;
+ struct redparams q_params[RIO_NDROPPREC];
};
struct rio_conf {
- struct rio_interface iface;
- struct redparams q_params[RIO_NDROPPREC];
- int rio_weight; /* weight for EWMA */
- int rio_limit; /* max queue length */
- int rio_pkttime; /* average packet time in usec */
- int rio_flags; /* see below */
+ struct rio_interface iface;
+ struct redparams q_params[RIO_NDROPPREC];
+ int rio_weight; /* weight for EWMA */
+ int rio_limit; /* max queue length */
+ int rio_pkttime; /* avg packet time in usec */
+ int rio_flags; /* see below */
};
/* rio flags */
@@ -75,54 +75,54 @@ typedef struct rio {
/* per drop precedence structure */
struct dropprec_state {
/* red parameters */
- int inv_pmax; /* inverse of max drop probability */
- int th_min; /* red min threshold */
- int th_max; /* red max threshold */
+ int inv_pmax; /* inverse of max drop probability */
+ int th_min; /* red min threshold */
+ int th_max; /* red max threshold */
/* variables for internal use */
- int th_min_s; /* th_min scaled by avgshift */
- int th_max_s; /* th_max scaled by avgshift */
- int probd; /* drop probability denominator */
-
- int qlen; /* queue length */
- int avg; /* (scaled) queue length average */
- int count; /* packet count since the last dropped/marked
- packet */
- int idle; /* queue was empty */
- int old; /* avg is above th_min */
- struct timeval last; /* timestamp when queue becomes idle */
+ int th_min_s; /* th_min scaled by avgshift */
+ int th_max_s; /* th_max scaled by avgshift */
+ int probd; /* drop probability denominator */
+
+ int qlen; /* queue length */
+ int avg; /* (scaled) queue length average */
+ int count; /* packet count since the last dropped/
+ marked packet */
+ int idle; /* queue was empty */
+ int old; /* avg is above th_min */
+ struct timeval last; /* timestamp when queue becomes idle */
} rio_precstate[RIO_NDROPPREC];
- int rio_wshift; /* log(red_weight) */
- int rio_weight; /* weight for EWMA */
- struct wtab *rio_wtab; /* weight table */
+ int rio_wshift; /* log(red_weight) */
+ int rio_weight; /* weight for EWMA */
+ struct wtab *rio_wtab; /* weight table */
- int rio_pkttime; /* average packet time in micro sec
- used for idle calibration */
- int rio_flags; /* rio flags */
+ int rio_pkttime; /* average packet time in micro sec
+ used for idle calibration */
+ int rio_flags; /* rio flags */
- u_int8_t rio_codepoint; /* codepoint value to tag packets */
- u_int8_t rio_codepointmask; /* codepoint mask bits */
+ u_int8_t rio_codepoint; /* codepoint value to tag packets */
+ u_int8_t rio_codepointmask; /* codepoint mask bits */
struct redstats q_stats[RIO_NDROPPREC]; /* statistics */
} rio_t;
typedef struct rio_queue {
- struct rio_queue *rq_next; /* next red_state in the list */
- struct ifaltq *rq_ifq; /* backpointer to ifaltq */
+ struct rio_queue *rq_next; /* next red_state in the list */
+ struct ifaltq *rq_ifq; /* backpointer to ifaltq */
- class_queue_t *rq_q;
+ class_queue_t *rq_q;
- rio_t *rq_rio;
+ rio_t *rq_rio;
} rio_queue_t;
-extern rio_t *rio_alloc(int, struct redparams *, int, int);
-extern void rio_destroy(rio_t *);
-extern void rio_getstats(rio_t *, struct redstats *);
-extern int rio_addq(rio_t *, class_queue_t *, struct mbuf *,
- struct altq_pktattr *);
-extern struct mbuf *rio_getq(rio_t *, class_queue_t *);
-extern int rio_set_meter(rio_t *, int, int, int);
+extern rio_t *rio_alloc(int, struct redparams *, int, int);
+extern void rio_destroy(rio_t *);
+extern void rio_getstats(rio_t *, struct redstats *);
+extern int rio_addq(rio_t *, class_queue_t *, struct mbuf *,
+ struct altq_pktattr *);
+extern struct mbuf *rio_getq(rio_t *, class_queue_t *);
+extern int rio_set_meter(rio_t *, int, int, int);
#endif /* _KERNEL */
diff --git a/sys/altq/altq_rmclass.c b/sys/altq/altq_rmclass.c
index 50c3554f411..9c07af81c2f 100644
--- a/sys/altq/altq_rmclass.c
+++ b/sys/altq/altq_rmclass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_rmclass.c,v 1.6 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_rmclass.c,v 1.7 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_rmclass.c,v 1.10 2001/02/09 07:20:40 kjc Exp $ */
/*
@@ -63,24 +63,24 @@
* Local routines.
*/
-static int rmc_satisfied(struct rm_class *, struct timeval *);
-static void rmc_wrr_set_weights(struct rm_ifdat *);
-static void rmc_depth_compute(struct rm_class *);
-static void rmc_depth_recompute(rm_class_t *);
+static int rmc_satisfied(struct rm_class *, struct timeval *);
+static void rmc_wrr_set_weights(struct rm_ifdat *);
+static void rmc_depth_compute(struct rm_class *);
+static void rmc_depth_recompute(rm_class_t *);
static mbuf_t *_rmc_wrr_dequeue_next(struct rm_ifdat *, int);
static mbuf_t *_rmc_prr_dequeue_next(struct rm_ifdat *, int);
-static int _rmc_addq(rm_class_t *, mbuf_t *);
-static void _rmc_dropq(rm_class_t *);
+static int _rmc_addq(rm_class_t *, mbuf_t *);
+static void _rmc_dropq(rm_class_t *);
static mbuf_t *_rmc_getq(rm_class_t *);
static mbuf_t *_rmc_pollq(rm_class_t *);
-static int rmc_under_limit(struct rm_class *, struct timeval *);
-static void rmc_tl_satisfied(struct rm_ifdat *, struct timeval *);
-static void rmc_drop_action(struct rm_class *);
-static void rmc_restart(struct rm_class *);
-static void rmc_root_overlimit(struct rm_class *, struct rm_class *);
+static int rmc_under_limit(struct rm_class *, struct timeval *);
+static void rmc_tl_satisfied(struct rm_ifdat *, struct timeval *);
+static void rmc_drop_action(struct rm_class *);
+static void rmc_restart(struct rm_class *);
+static void rmc_root_overlimit(struct rm_class *, struct rm_class *);
#define BORROW_OFFTIME
/*
@@ -167,29 +167,19 @@ static void rmc_root_overlimit(struct rm_class *, struct rm_class *);
* offtime = offtime * 8 / (1000 * nsecPerByte)
*
* When USE_HRTIME is employed, then maxidle and offtime become:
- * maxidle = maxilde * (8.0 / nsecPerByte);
- * offtime = offtime * (8.0 / nsecPerByte);
+ * maxidle = maxilde * (8.0 / nsecPerByte);
+ * offtime = offtime * (8.0 / nsecPerByte);
*/
struct rm_class *
-rmc_newclass(pri, ifd, nsecPerByte, action, maxq, parent, borrow,
- maxidle, minidle, offtime, pktsize, flags)
- int pri;
- struct rm_ifdat *ifd;
- u_int nsecPerByte;
- void (*action)(rm_class_t *, rm_class_t *);
- int maxq;
- struct rm_class *parent;
- struct rm_class *borrow;
- u_int maxidle;
- int minidle;
- u_int offtime;
- int pktsize;
- int flags;
+rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte,
+ void (*action)(rm_class_t *, rm_class_t *), int maxq,
+ struct rm_class *parent, struct rm_class *borrow, u_int maxidle,
+ int minidle, u_int offtime, int pktsize, int flags)
{
- struct rm_class *cl;
- struct rm_class *peer;
- int s;
+ struct rm_class *cl;
+ struct rm_class *peer;
+ int s;
if (pri >= RM_MAXPRIO)
return (NULL);
@@ -336,18 +326,12 @@ rmc_newclass(pri, ifd, nsecPerByte, action, maxq, parent, borrow,
}
int
-rmc_modclass(cl, nsecPerByte, maxq, maxidle, minidle, offtime, pktsize)
- struct rm_class *cl;
- u_int nsecPerByte;
- int maxq;
- u_int maxidle;
- int minidle;
- u_int offtime;
- int pktsize;
+rmc_modclass(struct rm_class *cl, u_int nsecPerByte, int maxq, u_int maxidle,
+ int minidle, u_int offtime, int pktsize)
{
struct rm_ifdat *ifd;
- u_int old_allotment;
- int s;
+ u_int old_allotment;
+ int s;
ifd = cl->ifdat_;
old_allotment = cl->allotment_;
@@ -393,15 +377,14 @@ rmc_modclass(cl, nsecPerByte, maxq, maxidle, minidle, offtime, pktsize)
/*
* static void
* rmc_wrr_set_weights(struct rm_ifdat *ifdat) - This function computes
- * the appropriate run robin weights for the CBQ weighted round robin
+ * the appropriate run robin weights for the CBQ weighted round robin
* algorithm.
*
* Returns: NONE
*/
static void
-rmc_wrr_set_weights(ifd)
- struct rm_ifdat *ifd;
+rmc_wrr_set_weights(struct rm_ifdat *ifd)
{
int i;
struct rm_class *cl, *clh;
@@ -439,9 +422,7 @@ rmc_wrr_set_weights(ifd)
}
int
-rmc_get_weight(ifd, pri)
- struct rm_ifdat *ifd;
- int pri;
+rmc_get_weight(struct rm_ifdat *ifd, int pri)
{
if ((pri >= 0) && (pri < RM_MAXPRIO))
return (ifd->M_[pri]);
@@ -452,16 +433,15 @@ rmc_get_weight(ifd, pri)
/*
* static void
* rmc_depth_compute(struct rm_class *cl) - This function computes the
- * appropriate depth of class 'cl' and its ancestors.
+ * appropriate depth of class 'cl' and its ancestors.
*
* Returns: NONE
*/
static void
-rmc_depth_compute(cl)
- struct rm_class *cl;
+rmc_depth_compute(struct rm_class *cl)
{
- rm_class_t *t = cl, *p;
+ rm_class_t *t = cl, *p;
/*
* Recompute the depth for the branch of the tree.
@@ -481,7 +461,7 @@ rmc_depth_compute(cl)
* rmc_depth_recompute(struct rm_class *cl) - This function re-computes
* the depth of the tree after a class has been deleted.
*
- * Returns: NONE
+ * Returns: NONE
*/
static void
@@ -540,12 +520,10 @@ rmc_depth_recompute(rm_class_t *cl)
*/
void
-rmc_delete_class(ifd, cl)
- struct rm_ifdat *ifd;
- struct rm_class *cl;
+rmc_delete_class(struct rm_ifdat *ifd, struct rm_class *cl)
{
struct rm_class *p, *head, *previous;
- int s;
+ int s;
ASSERT(cl->children_ == NULL);
@@ -556,7 +534,7 @@ rmc_delete_class(ifd, cl)
/*
* Free packets in the packet queue.
* XXX - this may not be a desired behavior. Packets should be
- * re-queued.
+ * re-queued.
*/
rmc_dropall(cl);
@@ -662,17 +640,9 @@ rmc_delete_class(ifd, cl)
*/
void
-rmc_init(ifq, ifd, nsecPerByte, restart, maxq, maxqueued, maxidle,
- minidle, offtime, flags)
- struct ifaltq *ifq;
- struct rm_ifdat *ifd;
- u_int nsecPerByte;
- void (*restart)(struct ifaltq *);
- int maxq, maxqueued;
- u_int maxidle;
- int minidle;
- u_int offtime;
- int flags;
+rmc_init(struct ifaltq *ifq, struct rm_ifdat *ifd, u_int nsecPerByte,
+ void (*restart)(struct ifaltq *), int maxq, int maxqueued, u_int maxidle,
+ int minidle, u_int offtime, int flags)
{
int i, mtu;
@@ -747,14 +717,12 @@ rmc_init(ifq, ifd, nsecPerByte, restart, maxq, maxqueued, maxidle,
* -1 when packet drop occurs
*/
int
-rmc_queue_packet(cl, m)
- struct rm_class *cl;
- mbuf_t *m;
+rmc_queue_packet(struct rm_class *cl, mbuf_t *m)
{
- struct timeval now;
+ struct timeval now;
struct rm_ifdat *ifd = cl->ifdat_;
- int cpri = cl->pri_;
- int is_empty = qempty(cl->q_);
+ int cpri = cl->pri_;
+ int is_empty = qempty(cl->q_);
RM_GETTIME(now);
if (ifd->cutoff_ > 0) {
@@ -817,11 +785,9 @@ rmc_queue_packet(cl, m)
*/
static void
-rmc_tl_satisfied(ifd, now)
- struct rm_ifdat *ifd;
- struct timeval *now;
+rmc_tl_satisfied(struct rm_ifdat *ifd, struct timeval *now)
{
- int i;
+ int i;
rm_class_t *p, *bp;
for (i = RM_MAXPRIO - 1; i >= 0; i--) {
@@ -845,11 +811,9 @@ rmc_tl_satisfied(ifd, now)
*/
static int
-rmc_satisfied(cl, now)
- struct rm_class *cl;
- struct timeval *now;
+rmc_satisfied(struct rm_class *cl, struct timeval *now)
{
- rm_class_t *p;
+ rm_class_t *p;
if (cl == NULL)
return (1);
@@ -880,9 +844,7 @@ rmc_satisfied(cl, now)
*/
static int
-rmc_under_limit(cl, now)
- struct rm_class *cl;
- struct timeval *now;
+rmc_under_limit(struct rm_class *cl, struct timeval *now)
{
rm_class_t *p = cl;
rm_class_t *top;
@@ -964,15 +926,13 @@ rmc_under_limit(cl, now)
*/
static mbuf_t *
-_rmc_wrr_dequeue_next(ifd, op)
- struct rm_ifdat *ifd;
- int op;
+_rmc_wrr_dequeue_next(struct rm_ifdat *ifd, int op)
{
struct rm_class *cl = NULL, *first = NULL;
- u_int deficit;
- int cpri;
+ u_int deficit;
+ int cpri;
mbuf_t *m;
- struct timeval now;
+ struct timeval now;
RM_GETTIME(now);
@@ -1122,14 +1082,12 @@ _rmc_wrr_dequeue_next(ifd, op)
* output.
*/
static mbuf_t *
-_rmc_prr_dequeue_next(ifd, op)
- struct rm_ifdat *ifd;
- int op;
+_rmc_prr_dequeue_next(struct rm_ifdat *ifd, int op)
{
mbuf_t *m;
- int cpri;
+ int cpri;
struct rm_class *cl, *first = NULL;
- struct timeval now;
+ struct timeval now;
RM_GETTIME(now);
@@ -1238,9 +1196,7 @@ _rmc_prr_dequeue_next(ifd, op)
*/
mbuf_t *
-rmc_dequeue_next(ifd, mode)
- struct rm_ifdat *ifd;
- int mode;
+rmc_dequeue_next(struct rm_ifdat *ifd, int mode)
{
if (ifd->queued_ >= ifd->maxqueued_)
return (NULL);
@@ -1264,11 +1220,10 @@ rmc_dequeue_next(ifd, mode)
*/
#define NSEC_TO_USEC(t) (((t) >> 10) + ((t) >> 16) + ((t) >> 17))
void
-rmc_update_class_util(ifd)
- struct rm_ifdat *ifd;
+rmc_update_class_util(struct rm_ifdat *ifd)
{
- int idle, avgidle, pktlen;
- int pkt_time, tidle;
+ int idle, avgidle, pktlen;
+ int pkt_time, tidle;
rm_class_t *cl, *borrowed;
rm_class_t *borrows;
struct timeval *nowp;
@@ -1444,8 +1399,7 @@ rmc_update_class_util(ifd)
*/
static void
-rmc_drop_action(cl)
- struct rm_class *cl;
+rmc_drop_action(struct rm_class *cl)
{
struct rm_ifdat *ifd = cl->ifdat_;
@@ -1455,10 +1409,9 @@ rmc_drop_action(cl)
ifd->na_[cl->pri_]--;
}
-void rmc_dropall(cl)
- struct rm_class *cl;
+void rmc_dropall(struct rm_class *cl)
{
- struct rm_ifdat *ifd = cl->ifdat_;
+ struct rm_ifdat *ifd = cl->ifdat_;
if (!qempty(cl->q_)) {
_flushq(cl->q_);
@@ -1467,23 +1420,6 @@ void rmc_dropall(cl)
}
}
-#if (__FreeBSD_version > 300000)
-/* hzto() is removed from FreeBSD-3.0 */
-static int hzto(struct timeval *);
-
-static int
-hzto(tv)
- struct timeval *tv;
-{
- struct timeval t2;
-
- getmicrotime(&t2);
- t2.tv_sec = tv->tv_sec - t2.tv_sec;
- t2.tv_usec = tv->tv_usec - t2.tv_usec;
- return (tvtohz(&t2));
-}
-#endif /* __FreeBSD_version > 300000 */
-
/*
* void
* rmc_delay_action(struct rm_class *cl) - This function is the generic CBQ
@@ -1497,8 +1433,7 @@ hzto(tv)
*/
void
-rmc_delay_action(cl, borrow)
- struct rm_class *cl, *borrow;
+rmc_delay_action(struct rm_class *cl, struct rm_class *borrow)
{
int delay, t, extradelay;
@@ -1576,11 +1511,10 @@ rmc_delay_action(cl, borrow)
*/
static void
-rmc_restart(cl)
- struct rm_class *cl;
+rmc_restart(struct rm_class *cl)
{
- struct rm_ifdat *ifd = cl->ifdat_;
- int s;
+ struct rm_ifdat *ifd = cl->ifdat_;
+ int s;
s = splimp();
if (cl->sleeping_) {
@@ -1604,8 +1538,7 @@ rmc_restart(cl)
*/
static void
-rmc_root_overlimit(cl, borrow)
- struct rm_class *cl, *borrow;
+rmc_root_overlimit(struct rm_class *cl, struct rm_class *borrow)
{
panic("rmc_root_overlimit");
}
@@ -1617,9 +1550,7 @@ rmc_root_overlimit(cl, borrow)
*/
static int
-_rmc_addq(cl, m)
- rm_class_t *cl;
- mbuf_t *m;
+_rmc_addq(rm_class_t *cl, mbuf_t *m)
{
#ifdef ALTQ_RIO
if (q_is_rio(cl->q_))
@@ -1639,18 +1570,16 @@ _rmc_addq(cl, m)
/* note: _rmc_dropq is not called for red */
static void
-_rmc_dropq(cl)
- rm_class_t *cl;
+_rmc_dropq(rm_class_t *cl)
{
- mbuf_t *m;
+ mbuf_t *m;
if ((m = _getq(cl->q_)) != NULL)
m_freem(m);
}
static mbuf_t *
-_rmc_getq(cl)
- rm_class_t *cl;
+_rmc_getq(rm_class_t *cl)
{
#ifdef ALTQ_RIO
if (q_is_rio(cl->q_))
@@ -1664,17 +1593,16 @@ _rmc_getq(cl)
}
static mbuf_t *
-_rmc_pollq(cl)
- rm_class_t *cl;
+_rmc_pollq(rm_class_t *cl)
{
return qhead(cl->q_);
}
#ifdef CBQ_TRACE
-struct cbqtrace cbqtrace_buffer[NCBQTRACE+1];
+struct cbqtrace cbqtrace_buffer[NCBQTRACE+1];
struct cbqtrace *cbqtrace_ptr = NULL;
-int cbqtrace_count;
+int cbqtrace_count;
/*
* DDB hook to trace cbq events:
@@ -1685,22 +1613,21 @@ void cbqtrace_dump(int);
static char *rmc_funcname(void *);
static struct rmc_funcs {
- void *func;
- char *name;
+ void *func;
+ char *name;
} rmc_funcs[] =
{
- rmc_init, "rmc_init",
- rmc_queue_packet, "rmc_queue_packet",
- rmc_under_limit, "rmc_under_limit",
- rmc_update_class_util, "rmc_update_class_util",
- rmc_delay_action, "rmc_delay_action",
- rmc_restart, "rmc_restart",
- _rmc_wrr_dequeue_next, "_rmc_wrr_dequeue_next",
- NULL, NULL
+ rmc_init, "rmc_init",
+ rmc_queue_packet, "rmc_queue_packet",
+ rmc_under_limit, "rmc_under_limit",
+ rmc_update_class_util, "rmc_update_class_util",
+ rmc_delay_action, "rmc_delay_action",
+ rmc_restart, "rmc_restart",
+ _rmc_wrr_dequeue_next, "_rmc_wrr_dequeue_next",
+ NULL, NULL
};
-static char *rmc_funcname(func)
- void *func;
+static char *rmc_funcname(void *func)
{
struct rmc_funcs *fp;
@@ -1710,11 +1637,10 @@ static char *rmc_funcname(func)
return ("unknown");
}
-void cbqtrace_dump(counter)
- int counter;
+void cbqtrace_dump(int counter)
{
- int i, *p;
- char *cp;
+ int i, *p;
+ char *cp;
counter = counter % NCBQTRACE;
p = (int *)&cbqtrace_buffer[counter];
@@ -1736,11 +1662,9 @@ void cbqtrace_dump(counter)
#if !defined(__GNUC__) || defined(ALTQ_DEBUG)
void
-_addq(q, m)
- class_queue_t *q;
- mbuf_t *m;
+_addq(class_queue_t *q, mbuf_t *m)
{
- mbuf_t *m0;
+ mbuf_t *m0;
if ((m0 = qtail(q)) != NULL)
m->m_nextpkt = m0->m_nextpkt;
@@ -1752,10 +1676,9 @@ _addq(q, m)
}
mbuf_t *
-_getq(q)
- class_queue_t *q;
+_getq(class_queue_t *q)
{
- mbuf_t *m, *m0;
+ mbuf_t *m, *m0;
if ((m = qtail(q)) == NULL)
return (NULL);
@@ -1772,10 +1695,9 @@ _getq(q)
/* drop a packet at the tail of the queue */
mbuf_t *
-_getq_tail(q)
- class_queue_t *q;
+_getq_tail(class_queue_t *q)
{
- mbuf_t *m, *m0, *prev;
+ mbuf_t *m, *m0, *prev;
if ((m = m0 = qtail(q)) == NULL)
return NULL;
@@ -1796,11 +1718,10 @@ _getq_tail(q)
/* randomly select a packet in the queue */
mbuf_t *
-_getq_random(q)
- class_queue_t *q;
+_getq_random(class_queue_t *q)
{
- struct mbuf *m;
- int i, n;
+ struct mbuf *m;
+ int i, n;
if ((m = qtail(q)) == NULL)
return NULL;
@@ -1825,11 +1746,9 @@ _getq_random(q)
}
void
-_removeq(q, m)
- class_queue_t *q;
- mbuf_t *m;
+_removeq(class_queue_t *q, mbuf_t *m)
{
- mbuf_t *m0, *prev;
+ mbuf_t *m0, *prev;
m0 = qtail(q);
do {
@@ -1845,8 +1764,7 @@ _removeq(q, m)
}
void
-_flushq(q)
- class_queue_t *q;
+_flushq(class_queue_t *q)
{
mbuf_t *m;
@@ -1856,4 +1774,4 @@ _flushq(q)
}
#endif /* !__GNUC__ || ALTQ_DEBUG */
-#endif /* ALTQ_CBQ || ALTQ_RED || ALTQ_RIO || ALTQ_HFSC || ALTQ_PRIQ */
+#endif /* ALTQ_CBQ || ALTQ_RED || ALTQ_RIO || ALTQ_HFSC || ALTQ_PRIQ */ \ No newline at end of file
diff --git a/sys/altq/altq_rmclass.h b/sys/altq/altq_rmclass.h
index 95cd0b615dd..08c774dfc8d 100644
--- a/sys/altq/altq_rmclass.h
+++ b/sys/altq/altq_rmclass.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_rmclass.h,v 1.5 2002/11/26 01:03:34 henning Exp $ */
+/* $OpenBSD: altq_rmclass.h,v 1.6 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_rmclass.h,v 1.6 2000/12/09 09:22:44 kjc Exp $ */
/*
@@ -172,7 +172,7 @@ struct rm_class {
struct timeval undertime_; /* time can next send */
struct timeval last_; /* time last packet sent */
struct timeval overtime_;
- struct callout callout_; /* for timeout() calls */
+ struct callout callout_; /* for timeout() calls */
rm_class_stats_t stats_; /* Class Statistics */
};
@@ -246,7 +246,7 @@ extern rm_class_t *rmc_newclass(int, struct rm_ifdat *, u_int,
int, struct rm_class *, struct rm_class *,
u_int, int, u_int, int, int);
extern void rmc_delete_class(struct rm_ifdat *, struct rm_class *);
-extern int rmc_modclass(struct rm_class *, u_int, int,
+extern int rmc_modclass(struct rm_class *, u_int, int,
u_int, int, u_int, int);
extern void rmc_init(struct ifaltq *, struct rm_ifdat *, u_int,
void (*)(struct ifaltq *),
diff --git a/sys/altq/altq_subr.c b/sys/altq/altq_subr.c
index a4c0d1ff25d..868b3bc56f2 100644
--- a/sys/altq/altq_subr.c
+++ b/sys/altq/altq_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_subr.c,v 1.13 2002/12/16 09:18:05 kjc Exp $ */
+/* $OpenBSD: altq_subr.c,v 1.14 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: altq_subr.c,v 1.11 2002/01/11 08:11:49 kjc Exp $ */
/*
@@ -199,7 +199,7 @@ altq_assert(file, line, failedexpr)
/*
* internal representation of token bucket parameters
- * rate: byte_per_unittime << 32
+ * rate: byte_per_unittime << 32
* (((bits_per_sec) / 8) << 32) / machclk_freq
* depth: byte << 32
*
diff --git a/sys/altq/if_altq.h b/sys/altq/if_altq.h
index 4df577faf4a..ded66078a3e 100644
--- a/sys/altq/if_altq.h
+++ b/sys/altq/if_altq.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_altq.h,v 1.6 2002/11/26 01:03:34 henning Exp $ */
+/* $OpenBSD: if_altq.h,v 1.7 2002/12/16 17:27:20 henning Exp $ */
/* $KAME: if_altq.h,v 1.6 2001/01/29 19:59:09 itojun Exp $ */
/*
@@ -129,7 +129,7 @@ struct tb_regulator {
#define ALTQF_DRIVER1 0x40 /* driver specific */
/* if_altqflags set internally only: */
-#define ALTQF_CANTCHANGE (ALTQF_READY)
+#define ALTQF_CANTCHANGE (ALTQF_READY)
/* altq_dequeue 2nd arg */
#define ALTDQ_REMOVE 1 /* dequeue mbuf from the queue */