Skip to content
Permalink
Browse files

Getting closer - try not to starve the Bulk tin.

  • Loading branch information
chromi committed Mar 17, 2017
1 parent 9c3da02 commit 6c341cef1b69a6a178e2571229cf78f37cca134d
Showing with 10 additions and 4 deletions.
  1. +10 −4 sch_cake.c
@@ -1277,18 +1277,24 @@ static struct sk_buff *cake_dequeue(struct Qdisc *sch)
b->base_delay = cake_ewma(b->base_delay, delay,
delay < b->base_delay ? 2 : 8);

/* charge packet bandwidth to this tin, and
* to the global shaper.
/* charge packet bandwidth to this tin, lower tins,
* and to the global shaper.
*/
{
if(q->rate_ns) {
s64 tdiff1 = b->tin_time_next_packet - now;
s64 tdiff2 = (len * (u64)b->tin_rate_ns) >> b->tin_rate_shft;
s64 tdiff3 = (len * (u64)q->rate_ns) >> q->rate_shft;

if(tdiff1 < 0)
b->tin_time_next_packet += tdiff2;
else if(tdiff1 < tdiff2)
b->tin_time_next_packet = now + tdiff2;

q->time_next_packet += tdiff3;
while(q->cur_tin--)
(--b)->tin_time_next_packet += tdiff3;
q->cur_tin = 0;
}
q->time_next_packet += (len * (u64)q->rate_ns) >> q->rate_shft;

if(q->overflow_timeout)
q->overflow_timeout--;

0 comments on commit 6c341ce

Please sign in to comment.
You can’t perform that action at this time.