All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Qdisc requeue should be void?
@ 2005-05-13 17:57 ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2005-05-13 17:57 UTC (permalink / raw)
  To: Jamal Hadi Salim, Patrick McHardy; +Cc: netdev, lartc

There is an design problem with the qdisc interface that causes qlen related bugs
in netem, tbf, and other qdisc's that peek at the top of the queue. The problem is
that requeue needs to be called from the dequeue function but requeue can fail.
If requeue fails, then the calling qdisc can not properly handle the error.  If it
returns NULL, then the parent's expectation about qlen gets messed up.

Example:

	prio (qlen = 1)
		skb = netem dequeue 
			skb = htb dequeue 
			... decides not to send this skb now
			htp requeue(skb) fails
				?? what now 
				--netem.qlen // := 0
				return NULL
		 skb is NULL

at this point prio qlen is 1 but underlying queue's are empty.

My proposal is to require requeue to always succeed and change it to be
void instead of returning int.
			
			
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-17 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-13 17:57 [LARTC] Qdisc requeue should be void? Stephen Hemminger
2005-05-13 17:57 ` Stephen Hemminger
2005-05-17 20:47 ` [LARTC] " Patrick McHardy
2005-05-17 20:47   ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.