bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	David Miller <davem@davemloft.net>,
	Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v4 0/6] libbpf: Fix pinning and error message bugs and add new getters
Date: Sun, 10 Nov 2019 19:29:10 -0800	[thread overview]
Message-ID: <CAADnVQ+qFOf0bchRNr270=dJ08R1wVgnYLAqJ8QnXwNt=fgNMQ@mail.gmail.com> (raw)
In-Reply-To: <157333184619.88376.13377736576285554047.stgit@toke.dk>

On Sat, Nov 9, 2019 at 12:37 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> This series fixes a few bugs in libbpf that I discovered while playing around
> with the new auto-pinning code, and writing the first utility in xdp-tools[0]:
>
> - If object loading fails, libbpf does not clean up the pinnings created by the
>   auto-pinning mechanism.
> - EPERM is not propagated to the caller on program load
> - Netlink functions write error messages directly to stderr
>
> In addition, libbpf currently only has a somewhat limited getter function for
> XDP link info, which makes it impossible to discover whether an attached program
> is in SKB mode or not. So the last patch in the series adds a new getter for XDP
> link info which returns all the information returned via netlink (and which can
> be extended later).
>
> Finally, add a getter for BPF program size, which can be used by the caller to
> estimate the amount of locked memory needed to load a program.
>
> A selftest is added for the pinning change, while the other features were tested
> in the xdp-filter tool from the xdp-tools repo. The 'new-libbpf-features' branch
> contains the commits that make use of the new XDP getter and the corrected EPERM
> error code.
>
> [0] https://github.com/xdp-project/xdp-tools
>
> Changelog:
>
> v4:
>   - Don't do any size checks on struct xdp_info, just copy (and/or zero)
>     whatever size the caller supplied.

Applied. Thanks

      parent reply	other threads:[~2019-11-11  3:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09 20:37 [PATCH bpf-next v4 0/6] libbpf: Fix pinning and error message bugs and add new getters Toke Høiland-Jørgensen
2019-11-09 20:37 ` [PATCH bpf-next v4 1/6] libbpf: Unpin auto-pinned maps if loading fails Toke Høiland-Jørgensen
2019-11-09 20:37 ` [PATCH bpf-next v4 2/6] selftests/bpf: Add tests for automatic map unpinning on load failure Toke Høiland-Jørgensen
2019-11-09 20:37 ` [PATCH bpf-next v4 3/6] libbpf: Propagate EPERM to caller on program load Toke Høiland-Jørgensen
2019-11-09 20:37 ` [PATCH bpf-next v4 4/6] libbpf: Use pr_warn() when printing netlink errors Toke Høiland-Jørgensen
2019-11-09 20:37 ` [PATCH bpf-next v4 5/6] libbpf: Add bpf_get_link_xdp_info() function to get more XDP information Toke Høiland-Jørgensen
2019-11-10  6:32   ` Andrii Nakryiko
2019-11-09 20:37 ` [PATCH bpf-next v4 6/6] libbpf: Add getter for program size Toke Høiland-Jørgensen
2019-11-11  3:29 ` Alexei Starovoitov [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='CAADnVQ+qFOf0bchRNr270=dJ08R1wVgnYLAqJ8QnXwNt=fgNMQ@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.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).