[Codel] [PATCH v5] pkt_sched: codel: Controlled Delay AQM

Eric Dumazet eric.dumazet at gmail.com
Sat May 5 16:20:51 EDT 2012


On Sat, 2012-05-05 at 16:49 +0200, Eric Dumazet wrote:
> From: Dave Taht <dave.taht at gmail.com>
> 

> +static bool should_drop(struct sk_buff *skb, struct Qdisc *sch, ktime_t now)
> +{
> +	struct codel_sched_data *q = qdisc_priv(sch);
> +	ktime_t sojourn_time;
> +	bool drop;
> +
> +	if (!skb) {
> +		q->first_above_time.tv64 = 0;
> +		return false;
> +	}
> +	sojourn_time = ktime_sub(now, get_enqueue_time(skb));
> +
> +	if (ktime_compare(sojourn_time, q->target) < 0 || 
> +	    sch->qstats.backlog < q->minbytes) {
> +		/* went below so we'll stay below for at least q->interval */
> +		q->first_above_time.tv64 = 0;
> +		return false;
> +	}

I believe we should allow the last packet to be sent even if
sch->qstats.backlog >= q->minbytes

Hmm... this means we should do the 
sch->qstats.backlog -= qdisc_pkt_len(skb);
right after the calls to __skb_dequeue(&sch->q);

(and not in the codel_drop() or at end of codel_dequeue())






More information about the Codel mailing list