BPF List
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: bpf@vger.kernel.org
Cc: Jiri Olsa <jolsa@redhat.com>, Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Establishing /usr/lib/bpf as a convention for eBPF bytecode files?
Date: Mon, 09 Dec 2019 12:29:27 +0100	[thread overview]
Message-ID: <87fthtlotk.fsf@toke.dk> (raw)

Hi everyone

As you have no doubt noticed, we have started thinking about how to
package eBPF-related applications in distributions. As a part of this,
I've been thinking about what to recommend for applications that ship
pre-compiled BPF byte-code files.

The obvious place to place those would be somewhere in the system
$LIBDIR (i.e., /usr/lib or /usr/lib64, depending on the distro). But
since BPF byte code is its own binary format, different from regular
executables, I think having a separate path to put those under makes
sense. So I'm proposing to establish a convention that pre-compiled BPF
programs be installed into /usr/lib{,64}/bpf.

This would let users discover which BPF programs are shipped on their
system, and it could be used to discover which package loaded a
particular BPF program, by walking the directory to find the file a
loaded program came from. It would not work for dynamically-generated
bytecode, of course, but I think at least some applications will end up
shipping pre-compiled bytecode files (we're doing that for xdp-tools,
for instance).

As I said, this would be a convention. We're already using it for
xdp-tools[0], so my plan is to use that as the "first mover", try to get
distributions to establish the path as a part of their filesystem
layout, and then just try to encourage packages to use it. Hopefully it
will catch on.

Does anyone have any objections to this? Do you think it is a complete
waste of time, or is it worth giving it a shot? :)

-Toke

[0] https://github.com/xdp-project/xdp-tools/blob/master/lib/defines.mk#L12


             reply	other threads:[~2019-12-09 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 11:29 Toke Høiland-Jørgensen [this message]
2019-12-10  1:40 ` Establishing /usr/lib/bpf as a convention for eBPF bytecode files? Alexei Starovoitov
2019-12-10  9:10   ` Jesper Dangaard Brouer
2019-12-10 10:26     ` Toke Høiland-Jørgensen

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=87fthtlotk.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=jolsa@redhat.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