diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-10-31 03:47:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:47:01 -0400 |
commit | 77be155cba4e163e8bba9fd27222a8b6189ec4f7 (patch) | |
tree | 0819d4c0bb760080aaba8a00060a774205914034 /net/sched/sch_hfsc.c | |
parent | 03c05f0d4bb0c267edf12d614025a40e33c5a6f9 (diff) |
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>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index ddfc40887848..d90b1652f2af 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1634,7 +1634,7 @@ hfsc_dequeue(struct Qdisc *sch) | |||
1634 | } | 1634 | } |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | skb = cl->qdisc->dequeue(cl->qdisc); | 1637 | skb = qdisc_dequeue_peeked(cl->qdisc); |
1638 | if (skb == NULL) { | 1638 | if (skb == NULL) { |
1639 | if (net_ratelimit()) | 1639 | if (net_ratelimit()) |
1640 | printk("HFSC: Non-work-conserving qdisc ?\n"); | 1640 | printk("HFSC: Non-work-conserving qdisc ?\n"); |
@@ -1727,6 +1727,7 @@ static struct Qdisc_ops hfsc_qdisc_ops __read_mostly = { | |||
1727 | .dump = hfsc_dump_qdisc, | 1727 | .dump = hfsc_dump_qdisc, |
1728 | .enqueue = hfsc_enqueue, | 1728 | .enqueue = hfsc_enqueue, |
1729 | .dequeue = hfsc_dequeue, | 1729 | .dequeue = hfsc_dequeue, |
1730 | .peek = qdisc_peek_dequeued, | ||
1730 | .requeue = hfsc_requeue, | 1731 | .requeue = hfsc_requeue, |
1731 | .drop = hfsc_drop, | 1732 | .drop = hfsc_drop, |
1732 | .cl_ops = &hfsc_class_ops, | 1733 | .cl_ops = &hfsc_class_ops, |