netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] segtree: add new segtree debugging option
Date: Wed, 15 Jan 2014 16:15:34 +0100	[thread overview]
Message-ID: <20140115151534.GA25232@localhost> (raw)
In-Reply-To: <20140115150624.GA652@macbook.localnet>

On Wed, Jan 15, 2014 at 03:06:24PM +0000, Patrick McHardy wrote:
> On Wed, Jan 15, 2014 at 04:03:00PM +0100, Pablo Neira Ayuso wrote:
> > On Wed, Jan 15, 2014 at 02:48:10PM +0000, Patrick McHardy wrote:
> > > On Wed, Jan 15, 2014 at 01:25:04PM +0100, Pablo Neira Ayuso wrote:
> > > > Currently, nft displays the debugging information if it's compiled with
> > > > --enable-debug (which seems a good idea) and when intervals are used
> > > > in maps. Add a new option to enable debugging to segtree, so we only
> > > > get this information when explicitly requested.
> > > > 
> > > > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > > > ---
> > > > We need this in master to avoid inconditional display of the
> > > > debugging information when --enable-debug is passed at configuration
> > > > / compilation time. I'm aware this patch conflicts with next-3.14,
> > > > that conflict should be easy to resolve.
> > > 
> > > Looks good, thanks, I wanted to change this myself.
> > 
> > Just pushed it, thanks.
> > 
> > > A few more things about debugging, some are easy, some might be a bit more
> > > work:
> > > 
> > > - we should use stdout for netlink rule debugging
> > 
> > OK, pushed another small patch for this.
> > 
> > > - netlink rule debugging is very very verbose since it dumps the entire
> > >   netlink message. I'd prefer to only have the netlink expressions
> > >   ([meta load ...]) and have the netlink message as another option.
> > >   It keeps scrolling everything off the screen.
> > 
> > Fine with me. I'd like to keep that there as option, it has helped me
> > to debug some issues in the past. Will check this.
> > 
> > > - netlink message debugging colors break in less. We should check for
> > >   isatty().
> > 
> > less -R can interpret them here.
> 
> Ok that's good enough for now, though I would usually rather surpress
> them completely. Still I'd suggest to use isatty() for redirections to
> files, bugtracker entries etc.

I'll add a new interface to libmnl that accepts flags to decide if we
want colors or not. But it would take some time until distributors
pack that new version of the library and I would like to avoid that.
I'll add this to my notepad so we can revisit this later.

      reply	other threads:[~2014-01-15 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 12:25 [PATCH nft] segtree: add new segtree debugging option Pablo Neira Ayuso
2014-01-15 14:48 ` Patrick McHardy
2014-01-15 15:03   ` Pablo Neira Ayuso
2014-01-15 15:06     ` Patrick McHardy
2014-01-15 15:15       ` Pablo Neira Ayuso [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=20140115151534.GA25232@localhost \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).