bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gilad Reti <gilad.reti@gmail.com>
To: bpf <bpf@vger.kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Subject: libbpf: pinning multiple progs from the same section
Date: Sun, 7 Feb 2021 13:35:45 +0200	[thread overview]
Message-ID: <CANaYP3G4zZu=d2Y_d+=418f6X9+5b-JFhk0h9VZoQmFFLhu3Ag@mail.gmail.com> (raw)

Hello there,

Last year, libbpf added support for attaching multiple handlers to the
same event by allowing defining multiple progs in the same elf
section. However, the pin path for a bpf program is obtained via the
__bpf_program__pin_name function, which uses an escaped version of the
elf section name as the pin_name. Thus, trying to pin multiple bpf
programs defined on the same section fails with "File exists" error,
since libbpf tries to pin more than one program on a single path.
Does adding the actual program name to the pin path makes sense?

Thanks.

             reply	other threads:[~2021-02-07 11:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 11:35 Gilad Reti [this message]
2021-02-08  8:57 ` libbpf: pinning multiple progs from the same section Gilad Reti
2021-02-08 11:42   ` Toke Høiland-Jørgensen
2021-02-08 11:57     ` Gilad Reti
2021-02-08 14:28       ` Toke Høiland-Jørgensen
2021-02-08 14:44         ` Gilad Reti
2021-02-08 15:09           ` Toke Høiland-Jørgensen
2021-02-08 15:50             ` Gilad Reti
2021-02-08 17:55               ` Toke Høiland-Jørgensen
2021-02-08 18:19                 ` Gilad Reti
2021-02-08 19:16                   ` Toke Høiland-Jørgensen
2021-02-09  8:35                     ` Gilad Reti
2021-02-09 11:03                       ` Toke Høiland-Jørgensen
2021-02-10 20:04                         ` Andrii Nakryiko
2021-02-08 22:36 ` Andrii Nakryiko

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='CANaYP3G4zZu=d2Y_d+=418f6X9+5b-JFhk0h9VZoQmFFLhu3Ag@mail.gmail.com' \
    --to=gilad.reti@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@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 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).