Lines Matching defs:avg
296 * to be compared with avg.
350 int avg, droptype;
364 avg = rp->red_avg;
379 * being idle for more than 1 minute, set avg to zero.
382 avg = 0;
387 /* the following line does (avg = (1 - Wq)^n * avg) */
389 avg = (avg >> FP_SHIFT) *
394 /* run estimator. (note: avg is scaled by WEIGHT in fixed-point) */
395 avg += (qlen(q) << FP_SHIFT) - (avg >> rp->red_wshift);
396 rp->red_avg = avg; /* save the new value */
406 if (avg >= rp->red_thmin_s && qlen(q) > 1) {
407 if (avg >= rp->red_thmax_s) {
408 /* avg >= th_max: forced drop */
414 } else if (drop_early((avg - rp->red_thmin_s) >> rp->red_wshift,
430 /* avg < th_min */
486 * prob = p_max * (avg - th_min) / (th_max - th_min)
488 * = (avg-th_min) / (2*(th_max-th_min)*inv_p_max - count*(avg-th_min))
506 * drop probability = (avg - TH_MIN) / d
639 * helper routine to calibrate avg during idle.