diff options
author | Kenjiro Cho <kjc@cvs.openbsd.org> | 2003-03-13 16:42:53 +0000 |
---|---|---|
committer | Kenjiro Cho <kjc@cvs.openbsd.org> | 2003-03-13 16:42:53 +0000 |
commit | 99c1bd6eb13ec9ef77f30f108736c65a6418987e (patch) | |
tree | 2cc235e74fcc947792f35927b854458d0b96af9b /sys/altq/altq_rmclass.c | |
parent | 7624ff4cd94c9c994c023b117e7a4b2db2783382 (diff) |
scale the red thresholds according to the queue limit.
the min and max thresholds are set to 10% and 30% of the queue limit.
Diffstat (limited to 'sys/altq/altq_rmclass.c')
-rw-r--r-- | sys/altq/altq_rmclass.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/altq/altq_rmclass.c b/sys/altq/altq_rmclass.c index b4d43381385..b423a622be6 100644 --- a/sys/altq/altq_rmclass.c +++ b/sys/altq/altq_rmclass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_rmclass.c,v 1.8 2003/01/07 00:29:28 cloder Exp $ */ +/* $OpenBSD: altq_rmclass.c,v 1.9 2003/03/13 16:42:52 kjc Exp $ */ /* $KAME: altq_rmclass.c,v 1.10 2001/02/09 07:20:40 kjc Exp $ */ /* @@ -270,8 +270,10 @@ rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, red_pkttime = nsecPerByte * pktsize / 1000; if (flags & RMCF_RED) { - cl->red_ = red_alloc(0, 0, 0, 0, - red_flags, red_pkttime); + cl->red_ = red_alloc(0, 0, + qlimit(cl->q_) * 10/100, + qlimit(cl->q_) * 30/100, + red_flags, red_pkttime); if (cl->red_ != NULL) qtype(cl->q_) = Q_RED; } |