=======================================
Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource
=======================================
Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource
IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995
IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995
the implementation is different. Particularly:
--- The WRR algorithm is different. Our version looks more
the implementation is different. Particularly:
--- The WRR algorithm is different. Our version looks more
- reasonable (I hope) and works when quanta are allowed to be
- less than MTU, which is always the case when real time classes
- have small rates. Note, that the statement of [3] is
- incomplete, delay may actually be estimated even if class
- per-round allotment is less than MTU. Namely, if per-round
- allotment is W*r_i, and r_1+...+r_k = r < 1
+ reasonable (I hope) and works when quanta are allowed to be
+ less than MTU, which is always the case when real time classes
+ have small rates. Note, that the statement of [3] is
+ incomplete, delay may actually be estimated even if class
+ per-round allotment is less than MTU. Namely, if per-round
+ allotment is W*r_i, and r_1+...+r_k = r < 1
Class goes to sleep, so that it will have no
chance to work avgidle. Let's forgive it 8)
Class goes to sleep, so that it will have no
chance to work avgidle. Let's forgive it 8)
It is mission critical procedure.
We "regenerate" toplevel cutoff, if transmitting class
It is mission critical procedure.
We "regenerate" toplevel cutoff, if transmitting class
/* It is not necessary now. Uncommenting it
will save CPU cycles, but decrease fairness.
*/
/* It is not necessary now. Uncommenting it
will save CPU cycles, but decrease fairness.
*/
(now - last) is total time between packet right edges.
(last_pktlen/rate) is "virtual" busy time, so that
(now - last) is total time between packet right edges.
(last_pktlen/rate) is "virtual" busy time, so that
+static void cbq_qlen_notify(struct Qdisc *sch, unsigned long arg)
+{
+ struct cbq_class *cl = (struct cbq_class *)arg;
+
+ if (cl->q->q.qlen == 0)
+ cbq_deactivate_class(cl);
+}
+
static unsigned long cbq_get(struct Qdisc *sch, u32 classid)
{
struct cbq_sched_data *q = qdisc_priv(sch);
static unsigned long cbq_get(struct Qdisc *sch, u32 classid)
{
struct cbq_sched_data *q = qdisc_priv(sch);