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>
This commit is contained in:
committed by
David S. Miller
parent
99c0db2679
commit
8e3af97899
@ -313,6 +313,15 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
|
||||
return skb;
|
||||
}
|
||||
|
||||
static struct sk_buff *dsmark_peek(struct Qdisc *sch)
|
||||
{
|
||||
struct dsmark_qdisc_data *p = qdisc_priv(sch);
|
||||
|
||||
pr_debug("dsmark_peek(sch %p,[qdisc %p])\n", sch, p);
|
||||
|
||||
return p->q->ops->peek(p->q);
|
||||
}
|
||||
|
||||
static int dsmark_requeue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
{
|
||||
struct dsmark_qdisc_data *p = qdisc_priv(sch);
|
||||
@ -496,6 +505,7 @@ static struct Qdisc_ops dsmark_qdisc_ops __read_mostly = {
|
||||
.priv_size = sizeof(struct dsmark_qdisc_data),
|
||||
.enqueue = dsmark_enqueue,
|
||||
.dequeue = dsmark_dequeue,
|
||||
.peek = dsmark_peek,
|
||||
.requeue = dsmark_requeue,
|
||||
.drop = dsmark_drop,
|
||||
.init = dsmark_init,
|
||||
|
Reference in New Issue
Block a user