[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D305598.1010207@trash.net>
Date: Fri, 14 Jan 2011 14:54:32 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Stephen Hemminger <shemminger@...tta.com>
CC: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] CHOKe flow scheduler (0.8)
On 14.01.2011 00:34, Stephen Hemminger wrote:
> +static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> +{
> ...
> + /* Is queue small? */
> + if (p->qavg <= p->qth_min)
> + p->qcount = -1;
> + else {
> + struct sk_buff *oskb;
> + unsigned int idx;
> +
> + /* Draw a packet at random from queue */
> + oskb = choke_peek_random(sch, &idx);
> +
> + /* Both packets from same flow ? */
> + if (*(unsigned int *)(qdisc_skb_cb(oskb)->data) == hash) {
> + /* Drop both packets */
> + q->stats.matched++;
> + choke_drop_by_idx(q, idx);
> + sch->qstats.backlog -= qdisc_pkt_len(skb);
> + --sch->q.qlen;
> + qdisc_drop(oskb, sch);
You need to adjust the qlen values of parent qdiscs by calling
qdisc_tree_decrease_qlen(), they are not aware that a second
packet has been dropped.
> + goto congestion_drop;
> + }
> +
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists