Netdev Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09 20:37 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 publically 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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git