[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200625232629.3444003-1-andriin@fb.com>
Date: Thu, 25 Jun 2020 16:26:27 -0700
From: Andrii Nakryiko <andriin@...com>
To: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <ast@...com>,
<daniel@...earbox.net>
CC: <andrii.nakryiko@...il.com>, <kernel-team@...com>,
Andrii Nakryiko <andriin@...com>
Subject: [PATCH bpf-next 0/2] Support disabling auto-loading of BPF programs
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
Powered by blists - more mailing lists