All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Schaaf <bof@bof.de>
To: Ranjeet Shetye <ranjeet.shetye@zultys.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Brute force printk routines for looking at netfilter structures
Date: Tue, 17 Dec 2002 21:37:37 +0100	[thread overview]
Message-ID: <20021217203737.GA25448@oknodo.bof.de> (raw)
In-Reply-To: <000001c2a609$30f256e0$0100a8c0@zultys.com>

Hello "Kernel Professor" :-)

some quick and dirty comments, after cursory reading of nf_debug.c:

> signed int nf_debug_indent = 0;

Why signed? Anyway, this will fall on its face on SMP systems.
Cure: use atomic_t.

I bet you can speed up your NF_DPF macro a lot. Try this:

#define NF_DPF(format, args...) \
{ \
	printk( \
		"%s() at %s:%d " \
		"%.*s" \
		format , \
		__FUNCTION__, __FILE__, __LINE__, \
		nf_debug_indent, "\t", \
		##args ); \
}

(Lightly tested; note that with that macro 'format' has to be
a string constant)

best regards
  Patrick

  reply	other threads:[~2002-12-17 20:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-17 20:16 Brute force printk routines for looking at netfilter structures Ranjeet Shetye
2002-12-17 20:37 ` Patrick Schaaf [this message]
2002-12-17 23:07   ` Patrick Schaaf
2002-12-18 20:49     ` nf_debug.c version 0.2 Ranjeet Shetye

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=20021217203737.GA25448@oknodo.bof.de \
    --to=bof@bof.de \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=ranjeet.shetye@zultys.com \
    /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.