summaryrefslogtreecommitdiff
path: root/sys/altq/altq_rio.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/altq/altq_rio.h')
-rw-r--r--sys/altq/altq_rio.h94
1 files changed, 47 insertions, 47 deletions
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 */