diff options
-rw-r--r-- | sys/altq/altq_hfsc.c | 6 | ||||
-rw-r--r-- | sys/altq/altq_priq.c | 8 | ||||
-rw-r--r-- | sys/altq/altq_rmclass.c | 8 |
3 files changed, 14 insertions, 8 deletions
diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c index 369b6c8f240..887cfa04caf 100644 --- a/sys/altq/altq_hfsc.c +++ b/sys/altq/altq_hfsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_hfsc.c,v 1.11 2003/03/11 02:25:59 kjc Exp $ */ +/* $OpenBSD: altq_hfsc.c,v 1.12 2003/03/13 16:42:52 kjc Exp $ */ /* $KAME: altq_hfsc.c,v 1.17 2002/11/29 07:48:33 kjc Exp $ */ /* @@ -424,7 +424,9 @@ hfsc_class_create(hif, rsc, fsc, usc, parent, qlimit, flags, qid) red_pkttime = (int64_t)hif->hif_ifq->altq_ifp->if_mtu * 1000 * 1000 * 1000 / (m2 / 8); if (flags & HFCF_RED) { - cl->cl_red = red_alloc(0, 0, 0, 0, + cl->cl_red = red_alloc(0, 0, + qlimit(cl->cl_q) * 10/100, + qlimit(cl->cl_q) * 30/100, red_flags, red_pkttime); if (cl->cl_red != NULL) qtype(cl->cl_q) = Q_RED; diff --git a/sys/altq/altq_priq.c b/sys/altq/altq_priq.c index 29acd1ce910..ad39e77fc18 100644 --- a/sys/altq/altq_priq.c +++ b/sys/altq/altq_priq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_priq.c,v 1.11 2003/03/11 02:25:59 kjc Exp $ */ +/* $OpenBSD: altq_priq.c,v 1.12 2003/03/13 16:42:52 kjc Exp $ */ /* $KAME: altq_priq.c,v 1.1 2000/10/18 09:15:23 kjc Exp $ */ /* * Copyright (C) 2000 @@ -330,8 +330,10 @@ priq_class_create(struct priq_if *pif, int pri, int qlimit, int flags, int qid) } else #endif if (flags & PRCF_RED) { - cl->cl_red = red_alloc(0, 0, 0, 0, - red_flags, red_pkttime); + cl->cl_red = red_alloc(0, 0, + qlimit(cl->cl_q) * 10/100, + qlimit(cl->cl_q) * 30/100, + red_flags, red_pkttime); if (cl->cl_red != NULL) qtype(cl->cl_q) = Q_RED; } 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; } |