diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-10-31 03:45:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:45:55 -0400 |
commit | 8e3af97899db433111287e07d5105189f56fe191 (patch) | |
tree | 40e7779ea4b587c9c3b882018ccaac1b53419f1c /net/sched/sch_dsmark.c | |
parent | 99c0db26797edb39cf83c8c5f8972067f5426b4e (diff) |
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_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index ba43aab3a851..3e491479ea86 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -313,6 +313,15 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) | |||
313 | return skb; | 313 | return skb; |
314 | } | 314 | } |
315 | 315 | ||
316 | static struct sk_buff *dsmark_peek(struct Qdisc *sch) | ||
317 | { | ||
318 | struct dsmark_qdisc_data *p = qdisc_priv(sch); | ||
319 | |||
320 | pr_debug("dsmark_peek(sch %p,[qdisc %p])\n", sch, p); | ||
321 | |||
322 | return p->q->ops->peek(p->q); | ||
323 | } | ||
324 | |||
316 | static int dsmark_requeue(struct sk_buff *skb, struct Qdisc *sch) | 325 | static int dsmark_requeue(struct sk_buff *skb, struct Qdisc *sch) |
317 | { | 326 | { |
318 | struct dsmark_qdisc_data *p = qdisc_priv(sch); | 327 | struct dsmark_qdisc_data *p = qdisc_priv(sch); |
@@ -496,6 +505,7 @@ static struct Qdisc_ops dsmark_qdisc_ops __read_mostly = { | |||
496 | .priv_size = sizeof(struct dsmark_qdisc_data), | 505 | .priv_size = sizeof(struct dsmark_qdisc_data), |
497 | .enqueue = dsmark_enqueue, | 506 | .enqueue = dsmark_enqueue, |
498 | .dequeue = dsmark_dequeue, | 507 | .dequeue = dsmark_dequeue, |
508 | .peek = dsmark_peek, | ||
499 | .requeue = dsmark_requeue, | 509 | .requeue = dsmark_requeue, |
500 | .drop = dsmark_drop, | 510 | .drop = dsmark_drop, |
501 | .init = dsmark_init, | 511 | .init = dsmark_init, |