aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_atm.c
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@gmail.com>2008-10-31 03:47:01 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:47:01 -0400
commit77be155cba4e163e8bba9fd27222a8b6189ec4f7 (patch)
tree0819d4c0bb760080aaba8a00060a774205914034 /net/sched/sch_atm.c
parent03c05f0d4bb0c267edf12d614025a40e33c5a6f9 (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_atm.c')
-rw-r--r--net/sched/sch_atm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 2ee0c1a8efa9..6eb9a650b63d 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -484,7 +484,7 @@ static void sch_atm_dequeue(unsigned long data)
484 if (!atm_may_send(flow->vcc, skb->truesize)) 484 if (!atm_may_send(flow->vcc, skb->truesize))
485 break; 485 break;
486 486
487 skb = flow->q->dequeue(flow->q); 487 skb = qdisc_dequeue_peeked(flow->q);
488 if (unlikely(!skb)) 488 if (unlikely(!skb))
489 break; 489 break;
490 490
@@ -519,7 +519,7 @@ static struct sk_buff *atm_tc_dequeue(struct Qdisc *sch)
519 519
520 pr_debug("atm_tc_dequeue(sch %p,[qdisc %p])\n", sch, p); 520 pr_debug("atm_tc_dequeue(sch %p,[qdisc %p])\n", sch, p);
521 tasklet_schedule(&p->task); 521 tasklet_schedule(&p->task);
522 skb = p->link.q->dequeue(p->link.q); 522 skb = qdisc_dequeue_peeked(p->link.q);
523 if (skb) 523 if (skb)
524 sch->q.qlen--; 524 sch->q.qlen--;
525 return skb; 525 return skb;