netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin.monnet@netronome.com>
To: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	oss-drivers@netronome.com,
	Quentin Monnet <quentin.monnet@netronome.com>
Subject: [PATCH bpf-next 0/6] tools: bpftool: add options for debug info from libbpf and verifier
Date: Mon, 29 Apr 2019 10:52:21 +0100	[thread overview]
Message-ID: <20190429095227.9745-1-quentin.monnet@netronome.com> (raw)

Hi,
This series adds several options to bpftool to make it print additional
information via libbpf or the kernel verifier when attempting to load
programs.

A first option is used to select the log level for libbpf, and a second one
is used for the verifier level. A third option (with a short name) is added
as a shortcut for printing all available information from both components.

A new API function is added to libbpf in order to pass the log_level from
bpftool with the bpf_object__* part of the API. Also, the flags defined to
name the verifier log levels are moved from kernel headers to UAPI headers,
in an effort to make it easier to users to pass the value they want.

Quentin Monnet (6):
  tools: bpftool: add --log-libbpf option to get debug info from libbpf
  tools: bpftool: add --log-all option to print all possible log info
  libbpf: add bpf_object__load_xattr() API function to pass log_level
  bpf: make BPF_LOG_* flags available in UAPI header
  tools: bpf: report latest changes from BPF UAPI header to tools
  tools: bpftool: add --log-verifier option to print kernel debug logs

 include/linux/bpf_verifier.h                  |   3 -
 include/uapi/linux/bpf.h                      |   5 +
 .../bpftool/Documentation/bpftool-prog.rst    |  20 ++++
 tools/bpf/bpftool/bash-completion/bpftool     |  46 +++++++-
 tools/bpf/bpftool/main.c                      | 105 ++++++++++++++++--
 tools/bpf/bpftool/main.h                      |   1 +
 tools/bpf/bpftool/prog.c                      |  24 ++--
 tools/include/uapi/linux/bpf.h                |   5 +
 tools/lib/bpf/libbpf.c                        |  20 +++-
 tools/lib/bpf/libbpf.h                        |   6 +
 tools/lib/bpf/libbpf.map                      |   1 +
 11 files changed, 211 insertions(+), 25 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-04-29  9:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  9:52 Quentin Monnet [this message]
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
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=20190429095227.9745-1-quentin.monnet@netronome.com \
    --to=quentin.monnet@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 \
    /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).