[Cake] Choosing a tin to work on
George Amanakis
g_amanakis at yahoo.com
Tue Apr 11 09:59:55 EDT 2017
Hi Jonathan,
I have some questions regarding the algorithm to choose a tin to dequeue from in sch_cake.c:-----------8<------------ int oi, best_tin=0;
s64 best_time = 0xFFFFFFFFFFFFUL;
for(oi=0; oi < q->tin_cnt; oi++) {
int tin = q->tin_order[oi];
b = q->tins + tin;
if((b->sparse_flow_count + b->bulk_flow_count) > 0) {
s64 tdiff = b->tin_time_next_packet - now;
if(tdiff <= 0 || tdiff <= best_time) {
best_time = tdiff;
best_tin = tin;
}
}
}-----------8<------------
1) best_time is defined as a positive signed integer, this equals to 78 hours if I did the calculations right. Why did you choose this? Did you mean to define it as "-1"?2) If you meant to define it as "-1", the condition "tdiff <= best_time" would not matter. I can see no case where "tdiff > 0" and "tdiff <= best_time".
Could you shed some light into this?
Thank you,George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20170411/d8249ab1/attachment.html>
More information about the Cake
mailing list