All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf <bpf@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 bpf-next 0/5] libbpf: error reporting changes for v1.0
Date: Tue, 25 May 2021 17:42:00 -0700	[thread overview]
Message-ID: <CAADnVQJbUQGqPVWJEHO2tdSF99qWzGrBTzW9_AsLP0=sGeE3pQ@mail.gmail.com> (raw)
In-Reply-To: <20210525035935.1461796-1-andrii@kernel.org>

On Mon, May 24, 2021 at 9:04 PM Andrii Nakryiko <andrii@kernel.org> wrote:
>
> Implement error reporting changes discussed in "Libbpf: the road to v1.0"
> ([0]) document.
>
> Libbpf gets a new API, libbpf_set_strict_mode() which accepts a set of flags
> that turn on a set of libbpf 1.0 changes, that might be potentially breaking.
> It's possible to opt-in into all current and future 1.0 features by specifying
> LIBBPF_STRICT_ALL flag.
>
> When some of the 1.0 "features" are requested, libbpf APIs might behave
> differently. In this patch set a first set of changes are implemented, all
> related to the way libbpf returns errors. See individual patches for details.
>
> Patch #1 adds a no-op libbpf_set_strict_mode() functionality to enable
> updating selftests.
>
> Patch #2 gets rid of all the bad code patterns that will break in libbpf 1.0
> (exact -1 comparison for low-level APIs, direct IS_ERR() macro usage to check
> pointer-returning APIs for error, etc). These changes make selftest work in
> both legacy and 1.0 libbpf modes. Selftests also opt-in into 100% libbpf 1.0
> mode to automatically gain all the subsequent changes, which will come in
> follow up patches.
>
> Patch #3 streamlines error reporting for low-level APIs wrapping bpf() syscall.
>
> Patch #4 streamlines errors for all the rest APIs.
>
> Patch #5 ensures that BPF skeletons propagate errors properly as well, as
> currently on error some APIs will return NULL with no way of checking exact
> error code.
>
>   [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY
>
> v1->v2:
>   - move libbpf_set_strict_mode() implementation to patch #1, where it belongs
>     (Alexei);
>   - add acks, slight rewording of commit messages.

Applied. Thanks

  parent reply	other threads:[~2021-05-26  0:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  3:59 [PATCH v2 bpf-next 0/5] libbpf: error reporting changes for v1.0 Andrii Nakryiko
2021-05-25  3:59 ` [PATCH v2 bpf-next 1/5] libbpf: add libbpf_set_strict_mode() API to turn on libbpf 1.0 behaviors Andrii Nakryiko
2021-05-25  3:59 ` [PATCH v2 bpf-next 2/5] selftests/bpf: turn on libbpf 1.0 mode and fix all IS_ERR checks Andrii Nakryiko
2021-05-25  3:59 ` [PATCH v2 bpf-next 3/5] libbpf: streamline error reporting for low-level APIs Andrii Nakryiko
2021-05-25  3:59 ` [PATCH v2 bpf-next 4/5] libbpf: streamline error reporting for high-level APIs Andrii Nakryiko
2021-05-25  3:59 ` [PATCH v2 bpf-next 5/5] bpftool: set errno on skeleton failures and propagate errors Andrii Nakryiko
2021-05-26  0:42 ` Alexei Starovoitov [this message]
2021-05-26  0:50 ` [PATCH v2 bpf-next 0/5] libbpf: error reporting changes for v1.0 patchwork-bot+netdevbpf

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='CAADnVQJbUQGqPVWJEHO2tdSF99qWzGrBTzW9_AsLP0=sGeE3pQ@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@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.