Lines Matching refs:avg
1010 * RED calculates the average queue size (avg) using a low-pass filter
1012 * avg <- (1-w_q) * avg + w_q * q_size
1016 * avg = (1 - w_q)^(idle/s)
1019 * Now, if avg < min_th the packet is enqueued.
1020 * If avg > max_th the packet is dropped. Otherwise, the packet is
1021 * dropped with probability P function of avg.
1034 * queue is not empty, avg <- avg + (q_size - avg) * w_q
1036 int diff = SCALE(q_size) - q->avg;
1039 q->avg += (int) v;
1048 if (q->avg) {
1051 q->avg = (t < fs->lookup_depth) ?
1052 SCALE_MUL(q->avg, fs->w_q_lookup[t]) : 0;
1055 DPRINTF(("dummynet: avg: %u ", SCALE_VAL(q->avg)));
1059 if (q->avg < fs->min_th) {
1063 if (q->avg >= fs->max_th) { /* average queue >= max threshold */
1066 * According to Gentle-RED, if avg is greater than max_th the
1068 * p_b = c_3 * avg - c_4
1071 p_b = SCALE_MUL((int64_t) fs->c_3, (int64_t) q->avg) - fs->c_4;
1077 } else if (q->avg > fs->min_th) {
1080 * avg - c_2, where c_1 = max_p / (max_th - min_th), and c_2 =
1083 p_b = SCALE_MUL((int64_t) fs->c_1, (int64_t) q->avg) - fs->c_2;