]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/sched/sch_fifo.c
pkt_sched: Add ->peek() methods for fifo, prio and SFQ qdiscs.
authorPatrick McHardy <kaber@trash.net>
Fri, 31 Oct 2008 07:44:18 +0000 (00:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 07:44:18 +0000 (00:44 -0700)
commit48a8f519e0fe22a5c98523286b2a120841a11dd5
treeec70428b026091669bf1e23779f9cfdd1a1ca46f
parent90d841fd0a5e02affd4e2bbdde4f710c61599281
pkt_sched: Add ->peek() methods for fifo, prio and SFQ qdiscs.

From: Patrick McHardy <kaber@trash.net>

Just as a demonstration how easy adding a peek operation to the
work-conserving qdiscs actually is. It doesn't need to keep or change
any internal state in many cases thanks to the guarantee that the
packet will either be dequeued or, if another packet arrives, the
upper qdisc will immediately ->peek again to reevaluate the state.

(This is only slightly modified Patrick's patch.)

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_fifo.c
net/sched/sch_prio.c
net/sched/sch_sfq.c