All of lore.kernel.org
 help / color / mirror / Atom feed
From: devik <devik@cdi.cz>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB_debug_dump: is annoying :) [Pach included]
Date: Sat, 05 Jul 2003 10:49:24 +0000	[thread overview]
Message-ID: <marc-lartc-105740228003691@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105737651226550@msgid-missing>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1229 bytes --]

And what about attached one ? It seems to do the same
but is less intrusive. htb_debug_dump is meant to do
its output in all cases because it is called from
bug-reporting places too.
But yes the call in htb_dump is superfluous so I used
your idea but changed it a bit. I'll submit it for
inclusion latter.

thanks,
-------------------------------
    Martin Devera aka devik
Linux kernel QoS/HTB maintainer
  http://luxik.cdi.cz/~devik/

> On Sat, 2003-07-05 at 03:09, Mike Mestnik wrote:
> > I use MRTG to graph tc -d output, so the debug_dump fills up my dmesg logs ect.  It's just
> > annoying.
> >
> > Attached is a patch vs 2.5.74 and my MRTG script.
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> --
> ( >-        LINUX, It's all about CHOICE      -< )
> /~\    __        twarren@redhat.com       __   /~\
> |  \) /  Pre Sales Consultant - Red Hat     \ (/ |
> |_|_  \    9820349221(M) | 22881326(O)      / _|_|
>        \___________________________________/
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1193 bytes --]

--- sch_htb.c	2003/06/18 19:55:49	1.20
+++ sch_htb.c	2003/07/05 10:37:51
@@ -21,7 +21,7 @@
  *			created test case so that I was able to fix nasty bug
  *		and many others. thanks.
  *
- * $Id: sch_htb.c,v 1.20 2003/06/18 19:55:49 devik Exp $
+ * $Id: sch_htb.c,v 1.21 2003/07/05 10:37:11 devik Exp devik $
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -98,7 +98,8 @@
  from LSB
  */
 #ifdef HTB_DEBUG
-#define HTB_DBG(S,L,FMT,ARG...) if (((q->debug>>(2*S))&3) >= L) \
+#define HTB_DBG_COND(S,L) (((q->debug>>(2*S))&3) >= L)
+#define HTB_DBG(S,L,FMT,ARG...) if (HTB_DBG_COND(S,L)) \
 	printk(KERN_DEBUG FMT,##ARG)
 #define HTB_CHCL(cl) BUG_TRAP((cl)->magic == HTB_CMAGIC)
 #define HTB_PASSQ q,
@@ -114,6 +115,7 @@
 		rb_erase(N,R); \
 		(N)->rb_color = -1; } while (0)
 #else
+#define HTB_DBG_COND(S,L) (0)
 #define HTB_DBG(S,L,FMT,ARG...)
 #define HTB_PASSQ
 #define HTB_ARGQ
@@ -1202,7 +1204,8 @@ static int htb_dump(struct Qdisc *sch, s
 	gopt.direct_pkts = q->direct_pkts;
 
 #ifdef HTB_DEBUG
-	htb_debug_dump(q);
+	if (HTB_DBG_COND(0,2))
+		htb_debug_dump(q);
 #endif
 	gopt.version = HTB_VER;
 	gopt.rate2quantum = q->rate2quantum;

      parent reply	other threads:[~2003-07-05 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-04 15:37 [LARTC] HTB_debug_dump: is annoying :) [Pach included] Trevor Warren
2003-07-04 21:39 ` Mike Mestnik
2003-07-05  8:34 ` Mike Mestnik
2003-07-05 10:49 ` devik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105740228003691@msgid-missing \
    --to=devik@cdi.cz \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.