diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-10-31 08:45:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 08:45:55 +0100 |
commit | 8e3af97899db433111287e07d5105189f56fe191 (patch) | |
tree | 40e7779ea4b587c9c3b882018ccaac1b53419f1c /net/sched/sch_red.c | |
parent | pkt_sched: sch_generic: Add generic qdisc->ops->peek() implementation. (diff) | |
download | linux-8e3af97899db433111287e07d5105189f56fe191.tar.xz linux-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_red.c')
-rw-r--r-- | net/sched/sch_red.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 5da05839e225..7abc51454c2d 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -140,6 +140,14 @@ static struct sk_buff * red_dequeue(struct Qdisc* sch) return skb; } +static struct sk_buff * red_peek(struct Qdisc* sch) +{ + struct red_sched_data *q = qdisc_priv(sch); + struct Qdisc *child = q->qdisc; + + return child->ops->peek(child); +} + static unsigned int red_drop(struct Qdisc* sch) { struct red_sched_data *q = qdisc_priv(sch); @@ -361,6 +369,7 @@ static struct Qdisc_ops red_qdisc_ops __read_mostly = { .cl_ops = &red_class_ops, .enqueue = red_enqueue, .dequeue = red_dequeue, + .peek = red_peek, .requeue = red_requeue, .drop = red_drop, .init = red_init, |