Subject: Re: [PATCH][NET_SCHED] sch_cbq: deactivating when grafting, purging etc.

From: Patrick McHardy <[email-masked]>
Date: Mon, 27 Nov 2006 10:55:39 +0100

Jarek Poplawski wrote:
> Here are some fixes proposals suggested by Patrick McHardy.
> 
> [NET_SCHED] sch_cbq:
> 
> - deactivating of active classes when grafting
> 
> - purging of queue/q.qlen adjustment when deleting an active class
> 
> - deactivating of active classes when q.qlen drops to zero in ->drop()
> 
> - a redundant instruction removed from cbq_deactivate_class (my own
>   suggestion)
> 
> PS: - purging of queue and deactivating of active classes
> when attaching a new child - not done (according to man, CBQ can carry
> packets in any type of nodes).

Your patch looks good, but it conflicts with my patches.

One thing I forgot to mention is that it should also have
a callback for deactivating classes when their childs
become empty. If you do that you can just call
disc_tree_decrement_qlen in graft/delete, which will take
care of the qlen decrement and class deactivation.