]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net_sched: prio: use qdisc_dequeue_peeked
authorFlorian Westphal <fw@strlen.de>
Tue, 9 Aug 2011 02:04:43 +0000 (02:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Aug 2011 04:52:11 +0000 (21:52 -0700)
commit 07bd8df5df4369487812bf85a237322ff3569b77
(sch_sfq: fix peek() implementation) changed sfq to use generic
peek helper.

This makes HFSC complain about a non-work-conserving child qdisc, if
prio with sfq child is used within hfsc:

hfsc peeks into prio qdisc, which will then peek into sfq.
returned skb is stashed in sch->gso_skb.

Next, hfsc tries to dequeue from prio, but prio will call sfq dequeue
directly, which may return NULL instead of previously peeked-at skb.

Have prio call qdisc_dequeue_peeked, so sfq->dequeue() is
not called in this case.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_prio.c

index 2a318f2dc3e532a90149a640d60848d10160a52b..b5d56a22b1d20f2605771ed8360a75f5d2f8ce75 100644 (file)
@@ -112,7 +112,7 @@ static struct sk_buff *prio_dequeue(struct Qdisc *sch)
 
        for (prio = 0; prio < q->bands; prio++) {
                struct Qdisc *qdisc = q->queues[prio];
-               struct sk_buff *skb = qdisc->dequeue(qdisc);
+               struct sk_buff *skb = qdisc_dequeue_peeked(qdisc);
                if (skb) {
                        qdisc_bstats_update(sch, skb);
                        sch->q.qlen--;