[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RED question



Does anybody could explain me why the first time qavg crosses mintrash
the function drop_early(pkt) is not called but only counters are
updated? (sorry if this question is already in archives but "NS Search"
seems not to work...).
Thanks,

Max.

In red.cc RED::enqueue:

	if (qavg >= edp_.th_min && qlen > 1) {
		if (qavg >= edp_.th_max) {
			droptype = DTYPE_FORCED;
========>>>		} else if (edv_.old == 0) {
			/* 
			 * The average queue size has just crossed the
			 * threshold from below to above "minthresh", or
			 * from above "minthresh" with an empty queue to
			 * above "minthresh" with a nonempty queue.
			 */
			edv_.count = 1;
			edv_.count_bytes = ch->size();
			edv_.old = 1;
		} else if (drop_early(pkt)) {
			droptype = DTYPE_UNFORCED;
		}
	}