Skip to content

Commit

Permalink
Update Diffserv4 thresholds and weights since we no longer (for ages …
Browse files Browse the repository at this point in the history
…now) charge bandwidth to lower tins.
  • Loading branch information
chromi committed Oct 1, 2016
1 parent f9f8a71 commit 423112e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sch_cake.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,11 +1415,11 @@ static void cake_config_diffserv4(struct Qdisc *sch)
}

/* class characteristics */
cake_set_rate(&q->tins[0], rate, mtu,
cake_set_rate(&q->tins[0], rate >> 4, mtu,
US2TIME(q->target), US2TIME(q->interval));
cake_set_rate(&q->tins[1], rate - (rate >> 4), mtu,
cake_set_rate(&q->tins[1], rate, mtu,
US2TIME(q->target), US2TIME(q->interval));
cake_set_rate(&q->tins[2], rate - (rate >> 2), mtu,
cake_set_rate(&q->tins[2], rate >> 1, mtu,
US2TIME(q->target), US2TIME(q->interval));
cake_set_rate(&q->tins[3], rate >> 2, mtu,
US2TIME(q->target), US2TIME(q->interval));
Expand All @@ -1431,10 +1431,10 @@ static void cake_config_diffserv4(struct Qdisc *sch)
q->tins[3].tin_quantum_prio = quantum << 4;

/* bandwidth-sharing weights */
q->tins[0].tin_quantum_band = (quantum >> 4);
q->tins[1].tin_quantum_band = (quantum >> 3) + (quantum >> 4);
q->tins[2].tin_quantum_band = (quantum >> 1);
q->tins[3].tin_quantum_band = (quantum >> 2);
q->tins[0].tin_quantum_band = quantum >> 4;
q->tins[1].tin_quantum_band = quantum;
q->tins[2].tin_quantum_band = quantum >> 1;
q->tins[3].tin_quantum_band = quantum >> 2;
}

static void cake_config_diffserv_llt(struct Qdisc *sch)
Expand Down

0 comments on commit 423112e

Please sign in to comment.