]> git.openfabrics.org - ~emulex/infiniband.git/commit
[PKT_SCHED] netem: use only inner qdisc -- no private skbuff queue
authorStephen Hemminger <shemminger@osdl.org>
Thu, 26 May 2005 19:55:01 +0000 (12:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 May 2005 19:55:01 +0000 (12:55 -0700)
commit0f9f32ac65ee4a452a912a8440cebbc4dff73852
tree86e8a90e0baad0fe22e2b354ef64562af61c2c87
parent0afb51e72855971dba83b3c6b70c547c2d1161fd
[PKT_SCHED] netem: use only inner qdisc -- no private skbuff queue

Netem works better if there if packets are just queued in the inner discipline
rather than having a separate delayed queue. Change to use the dequeue/requeue
to peek like TBF does.

By doing this potential qlen problems with the old method are avoided. The problems
happened when the netem_run that moved packets from the inner discipline to the nested
discipline failed (because inner queue was full). This happened in dequeue, so the
effective qlen of the netem would be decreased (because of the drop), but there was
no way to keep the outer qdisc (caller of netem dequeue) in sync.

The problem window is still there since this patch doesn't address the issue of
requeue failing in netem_dequeue, but that shouldn't happen since the sequence dequeue/requeue
should always work.  Long term correct fix is to implement qdisc->peek in all the qdisc's
to allow for this (needed by several other qdisc's as well).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c