pkt_sched: Add peek emulation for non-work-conserving qdiscs.
authorJarek Poplawski <jarkao2@gmail.com>
Fri, 31 Oct 2008 07:47:01 +0000 (00:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 07:47:01 +0000 (00:47 -0700)
commit77be155cba4e163e8bba9fd27222a8b6189ec4f7
tree0819d4c0bb760080aaba8a00060a774205914034
parent03c05f0d4bb0c267edf12d614025a40e33c5a6f9
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>
include/net/sch_generic.h
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_netem.c
net/sched/sch_tbf.c