diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-04 01:07:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-04 01:07:44 +0000 |
commit | c12845de4d588e383766df3d31fa8652a16dc02d (patch) | |
tree | 2f5eb06146201438b3dd514f1f6e3acb7714189f /sys | |
parent | 28cbd449868bde401f307ef8646abd60c069eb40 (diff) |
rip out more effectively dead code, ryan ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/altq/altq_cbq.h | 4 | ||||
-rw-r--r-- | sys/altq/altq_red.h | 3 | ||||
-rw-r--r-- | sys/altq/altq_rmclass.c | 45 | ||||
-rw-r--r-- | sys/altq/altq_rmclass.h | 4 |
4 files changed, 6 insertions, 50 deletions
diff --git a/sys/altq/altq_cbq.h b/sys/altq/altq_cbq.h index b78089db3f4..d3077ea323a 100644 --- a/sys/altq/altq_cbq.h +++ b/sys/altq/altq_cbq.h @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_cbq.h,v 1.12 2011/07/03 23:48:41 henning Exp $ */ +/* $OpenBSD: altq_cbq.h,v 1.13 2011/07/04 01:07:43 henning Exp $ */ /* $KAME: altq_cbq.h,v 1.5 2000/12/02 13:44:40 kjc Exp $ */ /* @@ -48,12 +48,10 @@ extern "C" { #define CBQCLF_RED 0x0001 /* use RED */ #define CBQCLF_ECN 0x0002 /* use RED/ECN */ #define CBQCLF_RIO 0x0004 /* use RIO */ -#define CBQCLF_FLOWVALVE 0x0008 /* use flowvalve (aka penalty-box) */ #define CBQCLF_BORROW 0x0020 /* borrow from parent */ /* class flags only for root class */ #define CBQCLF_WRR 0x0100 /* weighted-round robin */ -#define CBQCLF_EFFICIENT 0x0200 /* work-conserving */ /* class flags for special classes */ #define CBQCLF_ROOTCLASS 0x1000 /* root class */ diff --git a/sys/altq/altq_red.h b/sys/altq/altq_red.h index 2e104e2a4ab..c8bdf68f4dd 100644 --- a/sys/altq/altq_red.h +++ b/sys/altq/altq_red.h @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_red.h,v 1.5 2002/12/16 17:27:20 henning Exp $ */ +/* $OpenBSD: altq_red.h,v 1.6 2011/07/04 01:07:43 henning Exp $ */ /* $KAME: altq_red.h,v 1.5 2000/12/14 08:12:46 thorpej Exp $ */ /* @@ -36,7 +36,6 @@ #define REDF_ECN4 0x01 /* use packet marking for IPv4 packets */ #define REDF_ECN6 0x02 /* use packet marking for IPv6 packets */ #define REDF_ECN (REDF_ECN4 | REDF_ECN6) -#define REDF_FLOWVALVE 0x04 /* use flowvalve (aka penalty-box) */ /* * simpler versions of red parameters and statistics used by other diff --git a/sys/altq/altq_rmclass.c b/sys/altq/altq_rmclass.c index cafc2407f4d..d30fbddb977 100644 --- a/sys/altq/altq_rmclass.c +++ b/sys/altq/altq_rmclass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_rmclass.c,v 1.18 2011/07/03 23:59:43 henning Exp $ */ +/* $OpenBSD: altq_rmclass.c,v 1.19 2011/07/04 01:07:43 henning Exp $ */ /* $KAME: altq_rmclass.c,v 1.10 2001/02/09 07:20:40 kjc Exp $ */ /* @@ -242,8 +242,6 @@ rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, red_flags = 0; if (flags & RMCF_ECN) red_flags |= REDF_ECN; - if (flags & RMCF_FLOWVALVE) - red_flags |= REDF_FLOWVALVE; red_pkttime = nsecPerByte * pktsize / 1000; if (flags & RMCF_RED) { @@ -625,7 +623,6 @@ rmc_init(struct ifaltq *ifq, struct rm_ifdat *ifd, u_int nsecPerByte, ifd->ns_per_byte_ = nsecPerByte; ifd->maxpkt_ = mtu; ifd->wrr_ = (flags & RMCF_WRR) ? 1 : 0; - ifd->efficient_ = (flags & RMCF_EFFICIENT) ? 1 : 0; #if 1 ifd->maxiftime_ = mtu * nsecPerByte / 1000 * 16; if (mtu * nsecPerByte > 10 * 1000000) @@ -909,12 +906,6 @@ _rmc_wrr_dequeue_next(struct rm_ifdat *ifd, int op) if (op == ALTDQ_REMOVE && ifd->pollcache_) { cl = ifd->pollcache_; cpri = cl->pri_; - if (ifd->efficient_) { - /* check if this class is overlimit */ - if (cl->undertime_.tv_sec != 0 && - rmc_under_limit(cl, &now) == 0) - first = cl; - } ifd->pollcache_ = NULL; goto _wrr_out; } @@ -991,24 +982,8 @@ _rmc_wrr_dequeue_next(struct rm_ifdat *ifd, int op) */ reset_cutoff(ifd); CBQTRACE(_rmc_wrr_dequeue_next, 'otsr', ifd->cutoff_); + return (NULL); - if (!ifd->efficient_ || first == NULL) - return (NULL); - - cl = first; - cpri = cl->pri_; -#if 0 /* too time-consuming for nothing */ - if (cl->sleeping_) - CALLOUT_STOP(&cl->callout_); - cl->sleeping_ = 0; - cl->undertime_.tv_sec = 0; -#endif - ifd->borrowed_[ifd->qi_] = cl->borrow_; - ifd->cutoff_ = cl->borrow_->depth_; - - /* - * Deque the packet and do the book keeping... - */ _wrr_out: if (op == ALTDQ_REMOVE) { m = _rmc_getq(cl); @@ -1107,23 +1082,9 @@ _rmc_prr_dequeue_next(struct rm_ifdat *ifd, int op) * of the link-sharing structure are overlimit. */ reset_cutoff(ifd); - if (!ifd->efficient_ || first == NULL) - return (NULL); - cl = first; - cpri = cl->pri_; -#if 0 /* too time-consuming for nothing */ - if (cl->sleeping_) - CALLOUT_STOP(&cl->callout_); - cl->sleeping_ = 0; - cl->undertime_.tv_sec = 0; -#endif - ifd->borrowed_[ifd->qi_] = cl->borrow_; - ifd->cutoff_ = cl->borrow_->depth_; + return (NULL); - /* - * Deque the packet and do the book keeping... - */ _prr_out: if (op == ALTDQ_REMOVE) { m = _rmc_getq(cl); diff --git a/sys/altq/altq_rmclass.h b/sys/altq/altq_rmclass.h index 39ea2962013..b052c3da0b1 100644 --- a/sys/altq/altq_rmclass.h +++ b/sys/altq/altq_rmclass.h @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_rmclass.h,v 1.12 2011/07/03 23:48:41 henning Exp $ */ +/* $OpenBSD: altq_rmclass.h,v 1.13 2011/07/04 01:07:43 henning Exp $ */ /* $KAME: altq_rmclass.h,v 1.6 2000/12/09 09:22:44 kjc Exp $ */ /* @@ -181,7 +181,6 @@ struct rm_class { */ struct rm_ifdat { int queued_; /* # pkts queued downstream */ - int efficient_; /* Link Efficiency bit */ int wrr_; /* Enable Weighted Round-Robin */ u_long ns_per_byte_; /* Link byte speed. */ int maxqueued_; /* Max packets to queue */ @@ -230,7 +229,6 @@ struct rm_ifdat { #define RMCF_RED 0x0001 #define RMCF_ECN 0x0002 #define RMCF_RIO 0x0004 -#define RMCF_FLOWVALVE 0x0008 /* use flowvalve (aka penalty-box) */ /* flags for rmc_init */ #define RMCF_WRR 0x0100 |