netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Y Song <ys114321@gmail.com>
Cc: Quentin Monnet <quentin.monnet@netronome.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, bpf <bpf@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	oss-drivers@netronome.com
Subject: Re: [PATCH bpf-next 1/6] tools: bpftool: add --log-libbpf option to get debug info from libbpf
Date: Tue, 30 Apr 2019 15:39:32 -0400	[thread overview]
Message-ID: <20190430153932.7d741d4d@cakuba> (raw)
In-Reply-To: <CAH3MdRXFBsBdrmTc36yBs0Y0wcz4tOk-cBY4q6_s9bmtdnctyA@mail.gmail.com>

On Tue, 30 Apr 2019 08:31:53 -0700, Y Song wrote:
> On Tue, Apr 30, 2019 at 2:34 AM Quentin Monnet
> <quentin.monnet@netronome.com> wrote:
> >
> > Hi Yonghong,
> >
> > 2019-04-29 16:32 UTC-0700 ~ Y Song <ys114321@gmail.com>  
> > > On Mon, Apr 29, 2019 at 2:53 AM Quentin Monnet
> > > <quentin.monnet@netronome.com> wrote:  
> > >>
> > >> libbpf has three levels of priority for output: warn, info, debug. By
> > >> default, debug output is not printed to stderr.
> > >>
> > >> Add a new "--log-libbpf LOG_LEVEL" option to bpftool to provide more
> > >> flexibility on the log level for libbpf. LOG_LEVEL is a comma-separated
> > >> list of levels of log to print ("warn", "info", "debug"). The value
> > >> corresponding to the default behaviour would be "warn,info".  
> > >
> > > Do you think option like "warn,debug" will be useful for bpftool users?
> > > Maybe at bpftool level, we could allow user only to supply minimum level
> > > for log output, e.g., "info" will output "warn,info"?  
> > I've been pondering this, too. Since we allow to combine all levels for
> > the verifier logs it feels a bit odd to be less flexible for libbpf. And
> > we could imagine a user who wants verifier logs (so libbpf "debug") but
> > prefers to limit libbpf output (so no "info")... Although I admit this
> > might be a bit far-fetched.
> >
> > I can resend a version with the option taking only the minimal log
> > level, as you describe, if you think this is best.  
> 
> Thanks, I think providing a single minimum level for output probably
> better.

I have a weak preference for what we have here, because it's similar to
the kernel bit opt in (log level, stats etc)..

  reply	other threads:[~2019-04-30 19:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  9:52 [PATCH bpf-next 0/6] tools: bpftool: add options for debug info from libbpf and verifier Quentin Monnet
2019-04-29  9:52 ` [PATCH bpf-next 1/6] tools: bpftool: add --log-libbpf option to get debug info from libbpf Quentin Monnet
2019-04-29 23:32   ` Y Song
2019-04-30  9:34     ` Quentin Monnet
2019-04-30 15:31       ` Y Song
2019-04-30 19:39         ` Jakub Kicinski [this message]
2019-04-29  9:52 ` [PATCH bpf-next 2/6] tools: bpftool: add --log-all option to print all possible log info Quentin Monnet
2019-04-29  9:52 ` [PATCH bpf-next 3/6] libbpf: add bpf_object__load_xattr() API function to pass log_level Quentin Monnet
2019-04-29  9:52 ` [PATCH bpf-next 4/6] bpf: make BPF_LOG_* flags available in UAPI header Quentin Monnet
2019-05-05  6:19   ` Alexei Starovoitov
2019-05-07 17:06     ` Quentin Monnet
2019-04-29  9:52 ` [PATCH bpf-next 5/6] tools: bpf: report latest changes from BPF UAPI header to tools Quentin Monnet
2019-04-29  9:52 ` [PATCH bpf-next 6/6] tools: bpftool: add --log-verifier option to print kernel debug logs Quentin Monnet

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=20190430153932.7d741d4d@cakuba \
    --to=jakub.kicinski@netronome.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=quentin.monnet@netronome.com \
    --cc=ys114321@gmail.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 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).