pkt_sched: Add peek emulation for non-work-conserving qdiscs.
This patch adds qdisc_peek_dequeued() wrapper to emulate peek method with qdisc->dequeue() and storing "peeked" skb in qdisc->gso_skb until dequeuing. This is mainly for compatibility reasons not to break some strange configs because peeking is expected for non-work-conserving parent qdiscs to query work-conserving child qdiscs. This implementation requires using qdisc_dequeue_peeked() wrapper instead of directly calling qdisc->dequeue() for all qdiscs ever querried with qdisc->ops->peek() or qdisc_peek_dequeued(). Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

szülő
03c05f0d4b
commit
77be155cba
@@ -1634,7 +1634,7 @@ hfsc_dequeue(struct Qdisc *sch)
|
||||
}
|
||||
}
|
||||
|
||||
skb = cl->qdisc->dequeue(cl->qdisc);
|
||||
skb = qdisc_dequeue_peeked(cl->qdisc);
|
||||
if (skb == NULL) {
|
||||
if (net_ratelimit())
|
||||
printk("HFSC: Non-work-conserving qdisc ?\n");
|
||||
@@ -1727,6 +1727,7 @@ static struct Qdisc_ops hfsc_qdisc_ops __read_mostly = {
|
||||
.dump = hfsc_dump_qdisc,
|
||||
.enqueue = hfsc_enqueue,
|
||||
.dequeue = hfsc_dequeue,
|
||||
.peek = qdisc_peek_dequeued,
|
||||
.requeue = hfsc_requeue,
|
||||
.drop = hfsc_drop,
|
||||
.cl_ops = &hfsc_class_ops,
|
||||
|
Reference in New Issue
Block a user