diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-03 23:59:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-03 23:59:44 +0000 |
commit | 83041e559f3063321d066902536d1e73bd778e23 (patch) | |
tree | fd97bcf1416283867ec63dc5b1340b51379b69e5 /sys/altq | |
parent | 69c6e3e717bc952ed47f81420147377d3ee74a7d (diff) |
g/c RIO traces (aka clean up after tedu :))
Diffstat (limited to 'sys/altq')
-rw-r--r-- | sys/altq/altq_cbq.c | 6 | ||||
-rw-r--r-- | sys/altq/altq_classq.h | 5 | ||||
-rw-r--r-- | sys/altq/altq_hfsc.c | 32 | ||||
-rw-r--r-- | sys/altq/altq_priq.c | 33 | ||||
-rw-r--r-- | sys/altq/altq_rmclass.c | 35 |
5 files changed, 10 insertions, 101 deletions
diff --git a/sys/altq/altq_cbq.c b/sys/altq/altq_cbq.c index f3d70aa184c..80fc3a219dc 100644 --- a/sys/altq/altq_cbq.c +++ b/sys/altq/altq_cbq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_cbq.c,v 1.25 2008/05/09 14:10:05 dlg Exp $ */ +/* $OpenBSD: altq_cbq.c,v 1.26 2011/07/03 23:59:43 henning Exp $ */ /* $KAME: altq_cbq.c,v 1.9 2000/12/14 08:12:45 thorpej Exp $ */ /* @@ -181,10 +181,6 @@ get_class_stats(class_stats_t *statsp, struct rm_class *cl) if (q_is_red(cl->q_)) red_getstats(cl->red_, &statsp->red[0]); #endif -#ifdef ALTQ_RIO - if (q_is_rio(cl->q_)) - rio_getstats((rio_t *)cl->red_, &statsp->red[0]); -#endif } int diff --git a/sys/altq/altq_classq.h b/sys/altq/altq_classq.h index 4fdb9b43c57..a9ac6744fe1 100644 --- a/sys/altq/altq_classq.h +++ b/sys/altq/altq_classq.h @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_classq.h,v 1.4 2008/04/20 07:05:51 deraadt Exp $ */ +/* $OpenBSD: altq_classq.h,v 1.5 2011/07/03 23:59:43 henning Exp $ */ /* $KAME: altq_classq.h,v 1.4 2001/02/09 07:20:40 kjc Exp $ */ /* @@ -48,7 +48,6 @@ extern "C" { */ #define Q_DROPHEAD 0x00 #define Q_RED 0x01 -#define Q_RIO 0x02 #define Q_DROPTAIL 0x03 #ifdef _KERNEL @@ -73,8 +72,6 @@ typedef struct _class_queue_ class_queue_t; #define qempty(q) ((q)->qlen_ == 0) /* Is the queue empty?? */ #define q_is_red(q) ((q)->qtype_ == Q_RED) /* Is the queue a red queue */ -#define q_is_rio(q) ((q)->qtype_ == Q_RIO) /* Is the queue a rio queue */ -#define q_is_red_or_rio(q) ((q)->qtype_ == Q_RED || (q)->qtype_ == Q_RIO) #if !defined(__GNUC__) || defined(ALTQ_DEBUG) diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c index c0dd8339176..3744f587860 100644 --- a/sys/altq/altq_hfsc.c +++ b/sys/altq/altq_hfsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_hfsc.c,v 1.27 2011/07/03 23:48:41 henning Exp $ */ +/* $OpenBSD: altq_hfsc.c,v 1.28 2011/07/03 23:59:43 henning Exp $ */ /* $KAME: altq_hfsc.c,v 1.17 2002/11/29 07:48:33 kjc Exp $ */ /* @@ -354,7 +354,7 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc, qlen(cl->cl_q) = 0; cl->cl_flags = flags; #ifdef ALTQ_RED - if (flags & (HFCF_RED|HFCF_RIO)) { + if (flags & HFCF_RED) { int red_flags, red_pkttime; u_int m2; @@ -381,13 +381,6 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc, red_flags, red_pkttime); qtype(cl->cl_q) = Q_RED; } -#ifdef ALTQ_RIO - else { - cl->cl_red = (red_t *)rio_alloc(0, NULL, - red_flags, red_pkttime); - qtype(cl->cl_q) = Q_RIO; - } -#endif } #endif /* ALTQ_RED */ @@ -463,10 +456,6 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc, if (cl->cl_actc != NULL) actlist_destroy(cl->cl_actc); if (cl->cl_red != NULL) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_destroy((rio_t *)cl->cl_red); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) red_destroy(cl->cl_red); @@ -528,10 +517,6 @@ hfsc_class_destroy(struct hfsc_class *cl) actlist_destroy(cl->cl_actc); if (cl->cl_red != NULL) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_destroy((rio_t *)cl->cl_red); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) red_destroy(cl->cl_red); @@ -737,11 +722,6 @@ static int hfsc_addq(struct hfsc_class *cl, struct mbuf *m) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - return rio_addq((rio_t *)cl->cl_red, cl->cl_q, - m, cl->cl_pktattr); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) return red_addq(cl->cl_red, cl->cl_q, m, cl->cl_pktattr); @@ -759,10 +739,6 @@ hfsc_addq(struct hfsc_class *cl, struct mbuf *m) static struct mbuf * hfsc_getq(struct hfsc_class *cl) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - return rio_getq((rio_t *)cl->cl_red, cl->cl_q); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) return red_getq(cl->cl_red, cl->cl_q); @@ -1577,10 +1553,6 @@ get_class_stats(struct hfsc_classstats *sp, struct hfsc_class *cl) if (q_is_red(cl->cl_q)) red_getstats(cl->cl_red, &sp->red[0]); #endif -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_getstats((rio_t *)cl->cl_red, &sp->red[0]); -#endif } /* convert a class handle to the corresponding class pointer */ diff --git a/sys/altq/altq_priq.c b/sys/altq/altq_priq.c index 437e8d6d9cf..9d3eb5dc650 100644 --- a/sys/altq/altq_priq.c +++ b/sys/altq/altq_priq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_priq.c,v 1.23 2011/07/03 23:48:41 henning Exp $ */ +/* $OpenBSD: altq_priq.c,v 1.24 2011/07/03 23:59:43 henning Exp $ */ /* $KAME: altq_priq.c,v 1.1 2000/10/18 09:15:23 kjc Exp $ */ /* * Copyright (C) 2000 @@ -253,10 +253,6 @@ priq_class_create(struct priq_if *pif, int pri, int qlimit, int flags, int qid) if (!qempty(cl->cl_q)) priq_purgeq(cl); splx(s); -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_destroy((rio_t *)cl->cl_red); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) red_destroy(cl->cl_red); @@ -285,7 +281,7 @@ priq_class_create(struct priq_if *pif, int pri, int qlimit, int flags, int qid) cl->cl_handle = qid; #ifdef ALTQ_RED - if (flags & (PRCF_RED|PRCF_RIO)) { + if (flags & PRCF_RED) { int red_flags, red_pkttime; red_flags = 0; @@ -296,13 +292,6 @@ priq_class_create(struct priq_if *pif, int pri, int qlimit, int flags, int qid) else red_pkttime = (int64_t)pif->pif_ifq->altq_ifp->if_mtu * 1000 * 1000 * 1000 / (pif->pif_bandwidth / 8); -#ifdef ALTQ_RIO - if (flags & PRCF_RIO) { - cl->cl_red = (red_t *)rio_alloc(0, NULL, - red_flags, red_pkttime); - qtype(cl->cl_q) = Q_RIO; - } else -#endif if (flags & PRCF_RED) { cl->cl_red = red_alloc(0, 0, qlimit(cl->cl_q) * 10/100, @@ -341,10 +330,6 @@ priq_class_destroy(struct priq_class *cl) splx(s); if (cl->cl_red != NULL) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_destroy((rio_t *)cl->cl_red); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) red_destroy(cl->cl_red); @@ -439,11 +424,6 @@ static int priq_addq(struct priq_class *cl, struct mbuf *m) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - return rio_addq((rio_t *)cl->cl_red, cl->cl_q, m, - cl->cl_pktattr); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) return red_addq(cl->cl_red, cl->cl_q, m, cl->cl_pktattr); @@ -461,10 +441,6 @@ priq_addq(struct priq_class *cl, struct mbuf *m) static struct mbuf * priq_getq(struct priq_class *cl) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - return rio_getq((rio_t *)cl->cl_red, cl->cl_q); -#endif #ifdef ALTQ_RED if (q_is_red(cl->cl_q)) return red_getq(cl->cl_red, cl->cl_q); @@ -509,11 +485,6 @@ get_class_stats(struct priq_classstats *sp, struct priq_class *cl) if (q_is_red(cl->cl_q)) red_getstats(cl->cl_red, &sp->red[0]); #endif -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_getstats((rio_t *)cl->cl_red, &sp->red[0]); -#endif - } /* convert a class handle to the corresponding class pointer */ diff --git a/sys/altq/altq_rmclass.c b/sys/altq/altq_rmclass.c index bce7c82ad17..cafc2407f4d 100644 --- a/sys/altq/altq_rmclass.c +++ b/sys/altq/altq_rmclass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_rmclass.c,v 1.17 2011/07/03 23:48:41 henning Exp $ */ +/* $OpenBSD: altq_rmclass.c,v 1.18 2011/07/03 23:59:43 henning Exp $ */ /* $KAME: altq_rmclass.c,v 1.10 2001/02/09 07:20:40 kjc Exp $ */ /* @@ -190,14 +190,6 @@ rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, return (NULL); } #endif -#ifndef ALTQ_RIO - if (flags & RMCF_RIO) { -#ifdef ALTQ_DEBUG - printf("rmc_newclass: RIO not configured for CBQ!\n"); -#endif - return (NULL); - } -#endif cl = malloc(sizeof(struct rm_class), M_DEVBUF, M_WAITOK|M_ZERO); CALLOUT_INIT(&cl->callout_); @@ -244,7 +236,7 @@ rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, cl->overlimit = action; #ifdef ALTQ_RED - if (flags & (RMCF_RED|RMCF_RIO)) { + if (flags & RMCF_RED) { int red_flags, red_pkttime; red_flags = 0; @@ -261,13 +253,6 @@ rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, red_flags, red_pkttime); qtype(cl->q_) = Q_RED; } -#ifdef ALTQ_RIO - else { - cl->red_ = (red_t *)rio_alloc(0, NULL, - red_flags, red_pkttime); - qtype(cl->q_) = Q_RIO; - } -#endif } #endif /* ALTQ_RED */ @@ -594,10 +579,6 @@ rmc_delete_class(struct rm_ifdat *ifd, struct rm_class *cl) * Free the class structure. */ if (cl->red_ != NULL) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->q_)) - rio_destroy((rio_t *)cl->red_); -#endif #ifdef ALTQ_RED if (q_is_red(cl->q_)) red_destroy(cl->red_); @@ -1537,10 +1518,6 @@ rmc_root_overlimit(struct rm_class *cl, struct rm_class *borrow) static int _rmc_addq(rm_class_t *cl, mbuf_t *m) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->q_)) - return rio_addq((rio_t *)cl->red_, cl->q_, m, cl->pktattr_); -#endif #ifdef ALTQ_RED if (q_is_red(cl->q_)) return red_addq(cl->red_, cl->q_, m, cl->pktattr_); @@ -1563,10 +1540,6 @@ _rmc_dropq(rm_class_t *cl) static mbuf_t * _rmc_getq(rm_class_t *cl) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->q_)) - return rio_getq((rio_t *)cl->red_, cl->q_); -#endif #ifdef ALTQ_RED if (q_is_red(cl->q_)) return red_getq(cl->red_, cl->q_); @@ -1640,7 +1613,7 @@ void cbqtrace_dump(int counter) } #endif /* CBQ_TRACE */ -#if defined(ALTQ_CBQ) || defined(ALTQ_RED) || defined(ALTQ_RIO) || defined(ALTQ_HFSC) || defined(ALTQ_PRIQ) +#if defined(ALTQ_CBQ) || defined(ALTQ_RED) || defined(ALTQ_HFSC) || defined(ALTQ_PRIQ) #if !defined(__GNUC__) || defined(ALTQ_DEBUG) void @@ -1756,4 +1729,4 @@ _flushq(class_queue_t *q) } #endif /* !__GNUC__ || ALTQ_DEBUG */ -#endif /* ALTQ_CBQ || ALTQ_RED || ALTQ_RIO || ALTQ_HFSC || ALTQ_PRIQ */ +#endif /* ALTQ_CBQ || ALTQ_RED || ALTQ_HFSC || ALTQ_PRIQ */ |