diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-10-31 00:45:55 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 00:45:55 -0700 |
commit | 8e3af97899db433111287e07d5105189f56fe191 (patch) | |
tree | 40e7779ea4b587c9c3b882018ccaac1b53419f1c /net/sched/sch_atm.c | |
parent | 99c0db26797edb39cf83c8c5f8972067f5426b4e (diff) | |
download | linux-3.10-8e3af97899db433111287e07d5105189f56fe191.tar.gz linux-3.10-8e3af97899db433111287e07d5105189f56fe191.tar.bz2 linux-3.10-8e3af97899db433111287e07d5105189f56fe191.zip |
pkt_sched: Add qdisc->ops->peek() implementation.
Add qdisc->ops->peek() implementation for work-conserving qdiscs.
With feedback from Patrick McHardy.
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.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 43d37256c15..f9eac0818d1 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -522,6 +522,15 @@ static struct sk_buff *atm_tc_dequeue(struct Qdisc *sch) return skb; } +static struct sk_buff *atm_tc_peek(struct Qdisc *sch) +{ + struct atm_qdisc_data *p = qdisc_priv(sch); + + pr_debug("atm_tc_peek(sch %p,[qdisc %p])\n", sch, p); + + return p->link.q->ops->peek(p->link.q); +} + static int atm_tc_requeue(struct sk_buff *skb, struct Qdisc *sch) { struct atm_qdisc_data *p = qdisc_priv(sch); @@ -694,6 +703,7 @@ static struct Qdisc_ops atm_qdisc_ops __read_mostly = { .priv_size = sizeof(struct atm_qdisc_data), .enqueue = atm_tc_enqueue, .dequeue = atm_tc_dequeue, + .peek = atm_tc_peek, .requeue = atm_tc_requeue, .drop = atm_tc_drop, .init = atm_tc_init, |