Subject: Re: [PATCH net-next] pkt_sched: sch_htb: Warn on too many events.

From: Patrick McHardy <[email-masked]>
Date: Wed, 28 Jan 2009 17:18:12 +0100

Jarek Poplawski wrote:
> pkt_sched: sch_htb: Warn on too many events.
> 
> Let's get some info on possible config problems. This patch brings
> back an old warning, but it's printed only once now. BTW a "class
> isn't work conserving" warning is also limited to once per qdisc
> instead of per class.
> 
> With feedback from Patrick McHardy <[email-masked]>
> 
> Signed-off-by: Jarek Poplawski <[email-masked]>
> ---
> 
>  		skb = cl->un.leaf.q->dequeue(cl->un.leaf.q);
>  		if (likely(skb != NULL))
>  			break;
> -		if (!cl->warned) {
> +		if (!(q->warned & HTB_WARN_NONCONSERVING)) {
>  			printk(KERN_WARNING
>  			       "htb: class %X isn't work conserving ?!\n",
>  			       cl->common.classid);
> -			cl->warned = 1;
> +			q->warned |= HTB_WARN_NONCONSERVING;

How about making this flag and the warning message (in a out-of-line
function) globally available? Other qdiscs (f.i. HFSC) can't deal with
inner non-work-conserving qdiscs as well.