bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Support disabling auto-loading of BPF programs
@ 2020-06-25 23:26 Andrii Nakryiko
  2020-06-25 23:26 ` [PATCH bpf-next 1/2] libbpf: support disabling auto-loading " Andrii Nakryiko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andrii Nakryiko @ 2020-06-25 23:26 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel; +Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

Add ability to turn off default auto-loading of each BPF program by libbpf on
BPF object load. This is the feature that allows BPF applications to have
optional functionality, which is only excercised on kernel that support
necessary features, while falling back to reduced/less performant
functionality, if kernel is outdated.

Andrii Nakryiko (2):
  libbpf: support disabling auto-loading BPF programs
  selftests/bpf: test auto-load disabling logic for BPF programs

 tools/lib/bpf/libbpf.c                        | 48 +++++++++++++++----
 tools/lib/bpf/libbpf.h                        |  2 +
 tools/lib/bpf/libbpf.map                      |  2 +
 .../selftests/bpf/prog_tests/autoload.c       | 41 ++++++++++++++++
 .../selftests/bpf/progs/test_autoload.c       | 40 ++++++++++++++++
 5 files changed, 125 insertions(+), 8 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/autoload.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_autoload.c

-- 
2.24.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-28 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 23:26 [PATCH bpf-next 0/2] Support disabling auto-loading of BPF programs Andrii Nakryiko
2020-06-25 23:26 ` [PATCH bpf-next 1/2] libbpf: support disabling auto-loading " Andrii Nakryiko
2020-06-25 23:26 ` [PATCH bpf-next 2/2] selftests/bpf: test auto-load disabling logic for " Andrii Nakryiko
2020-06-26 20:11 ` [Potential Spoof] [PATCH bpf-next 0/2] Support disabling auto-loading of " Martin KaFai Lau
2020-06-28 17:15   ` Alexei Starovoitov

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).