Qdisc requeue should be void?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux