Lines Matching refs:qavg
151 unsigned long qavg; /* Average queue length: Wlog scaled */ member
166 v->qavg = 0; in red_set_vars()
276 v->qavg = 0; in red_restart()
310 return v->qavg >> shift; in red_calc_qavg_from_idle_time()
319 us_idle = (v->qavg * (u64)us_idle) >> p->Scell_log; in red_calc_qavg_from_idle_time()
321 if (us_idle < (v->qavg >> 1)) in red_calc_qavg_from_idle_time()
322 return v->qavg - us_idle; in red_calc_qavg_from_idle_time()
324 return v->qavg >> 1; in red_calc_qavg_from_idle_time()
341 return v->qavg + (backlog - (v->qavg >> p->Wlog)); in red_calc_qavg_no_idle_time()
362 unsigned long qavg) in red_mark_probability() argument
380 return !(((qavg - p->qth_min) >> p->Wlog) * v->qcount < v->qR); in red_mark_probability()
389 static inline int red_cmp_thresh(const struct red_parms *p, unsigned long qavg) in red_cmp_thresh() argument
391 if (qavg < p->qth_min) in red_cmp_thresh()
393 else if (qavg >= p->qth_max) in red_cmp_thresh()
407 unsigned long qavg) in red_action() argument
409 switch (red_cmp_thresh(p, qavg)) { in red_action()
416 if (red_mark_probability(p, v, qavg)) { in red_action()
437 unsigned long qavg; in red_adaptative_algo() local
440 qavg = v->qavg; in red_adaptative_algo()
442 qavg = red_calc_qavg_from_idle_time(p, v); in red_adaptative_algo()
445 qavg >>= p->Wlog; in red_adaptative_algo()
447 if (qavg > p->target_max && p->max_P <= MAX_P_MAX) in red_adaptative_algo()
449 else if (qavg < p->target_min && p->max_P >= MAX_P_MIN) in red_adaptative_algo()