Go to file
Alexei Starovoitov 52b07e56af Merge branch 'samples: bpf: Refactor XDP programs with libbpf'
"Daniel T. Lee" says:

====================
To avoid confusion caused by the increasing fragmentation of the BPF
Loader program, this commit would like to convert the previous bpf_load
loader with the libbpf loader.

Thanks to libbpf's bpf_link interface, managing the tracepoint BPF
program is much easier. bpf_program__attach_tracepoint manages the
enable of tracepoint event and attach of BPF programs to it with a
single interface bpf_link, so there is no need to manage event_fd and
prog_fd separately.

And due to addition of generic bpf_program__attach() to libbpf, it is
now possible to attach BPF programs with __attach() instead of
explicitly calling __attach_<type>().

This patchset refactors xdp_monitor with using this libbpf API, and the
bpf_load is removed and migrated to libbpf. Also, attach_tracepoint()
is replaced with the generic __attach() method in xdp_redirect_cpu.
Moreover, maps in kern program have been converted to BTF-defined map.
---
Changes in v2:
 - added cleanup logic for bpf_link and bpf_object in xdp_monitor
 - program section match with bpf_program__is_<type> instead of strncmp
 - revert BTF key/val type to default of BPF_MAP_TYPE_PERF_EVENT_ARRAY
 - split increment into seperate satement
 - refactor pointer array initialization
 - error code cleanup
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2020-10-11 12:14:43 -07:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-10-01 14:29:01 -07:00
block
certs
crypto
Documentation
drivers bpf: Add redirect_peer helper 2020-10-11 10:21:04 -07:00
fs
include bpf: Allow for map-in-map with dynamic inner array map entries 2020-10-11 10:21:04 -07:00
init
ipc
kernel bpf: Allow for map-in-map with dynamic inner array map entries 2020-10-11 10:21:04 -07:00
lib
LICENSES
mm
net bpf: Allow for map-in-map with dynamic inner array map entries 2020-10-11 10:21:04 -07:00
samples samples: bpf: Refactor XDP kern program maps with BTF-defined map 2020-10-11 12:14:36 -07:00
scripts
security
sound
tools bpf, selftests: Add redirect_peer selftest 2020-10-11 10:21:04 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS bpf, doc: Update Andrii's email in MAINTAINERS 2020-10-06 00:43:11 +02:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.