]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: remove refcount for bpf program
authoralexlzhu <alexlzhu@fb.com>
Wed, 18 Aug 2021 23:01:05 +0000 (16:01 -0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Oct 2021 10:48:23 +0000 (12:48 +0200)
commit76dc17254f7c78eae2dec2b9b1cfb60657a7b6e7
treeeaf61330174b3b5b5647cd11ec6951f5d1609220
parentd92681a65e7334297727c3048a3489c32e795e4b
core: remove refcount for bpf program

Currently ref count of bpf-program is kept in user space. However, the
kernel already implements its own ref count. Thus the ref count we keep for
bpf-program is redundant.

This PR removes ref count for bpf program as part of a task to simplify
bpf-program and remove redundancies, which will make the switch to
code-compiled BPF programs easier.

Part of #19270
src/core/bpf-devices.c
src/core/bpf-devices.h
src/core/bpf-firewall.c
src/core/bpf-foreign.c
src/core/cgroup.c
src/core/unit.c
src/shared/bpf-program.c
src/shared/bpf-program.h
src/test/test-bpf-devices.c
src/test/test-bpf-firewall.c
src/test/test-bpf-foreign-programs.c