mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 02:20:06 +01:00
build: drop "ebpf" configuration for n-acd compilation
Since we now check whether the user's machine supports eBPF at runtime, we can drop all of this build machinery.
This commit is contained in:
parent
191ebb439a
commit
8d33aaa5b6
7 changed files with 3 additions and 42 deletions
|
|
@ -155,12 +155,7 @@ test_subtree() {
|
|||
do_clean
|
||||
pushd ./src/$d
|
||||
|
||||
ARGS=()
|
||||
if [ "$d" = n-acd ]; then
|
||||
ARGS+=('-Debpf=false')
|
||||
fi
|
||||
|
||||
CC="$cc" CFLAGS="-Werror -Wall" meson build "${ARGS[@]}"
|
||||
CC="$cc" CFLAGS="-Werror -Wall" meson build
|
||||
ninja -v -C build test
|
||||
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -154,17 +154,6 @@
|
|||
%bcond_with ifcfg_migrate
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
# Although eBPF would be available on Fedora's kernel, it seems
|
||||
# we often get SELinux denials (rh#1651654). But even aside them,
|
||||
# bpf(BPF_MAP_CREATE, ...) randomly fails with EPERM. That might
|
||||
# be related to `ulimit -l`. Anyway, this is not usable at the
|
||||
# moment.
|
||||
%global ebpf_enabled "no"
|
||||
%else
|
||||
%global ebpf_enabled "no"
|
||||
%endif
|
||||
|
||||
# Fedora 33 enables LTO by default by setting CFLAGS="-flto -ffat-lto-objects".
|
||||
# However, we also require "-flto -flto-partition=none", so disable Fedora's
|
||||
# default and use our configure option --with-lto instead.
|
||||
|
|
@ -682,11 +671,6 @@ Preferably use nmcli instead.
|
|||
-Dlibpsl=true \
|
||||
%else
|
||||
-Dlibpsl=false \
|
||||
%endif
|
||||
%if %{ebpf_enabled} != "yes"
|
||||
-Debpf=false \
|
||||
%else
|
||||
-Debpf=true \
|
||||
%endif
|
||||
-Dsession_tracking=systemd \
|
||||
-Dsuspend_resume=systemd \
|
||||
|
|
|
|||
|
|
@ -155,7 +155,6 @@ P_CRYPTO="${CRYPTO-}"
|
|||
P_DBUS_SYS_DIR="${DBUS_SYS_DIR-}"
|
||||
P_DHCP_DEFAULT="${DHCP_DEFAULT-}"
|
||||
P_DNS_RC_MANAGER_DEFAULT="${DNS_RC_MANAGER_DEFAULT-}"
|
||||
P_EBPF_ENABLED="${EBPF_ENABLED-no}"
|
||||
P_FIREWALLD_ZONE="${FIREWALLD_ZONE-}"
|
||||
P_IWD="${IWD-}"
|
||||
P_LOGGING_BACKEND_DEFAULT="${LOGGING_BACKEND_DEFAULT-}"
|
||||
|
|
@ -396,7 +395,6 @@ meson setup\
|
|||
-Dmodify_system=true \
|
||||
-Dconcheck=true \
|
||||
-Dlibpsl="$(bool_true "$P_FEDORA")" \
|
||||
-Debpf="$(bool_true "$P_EBPF_ENABLED")" \
|
||||
-Dsession_tracking=systemd \
|
||||
-Dsuspend_resume=systemd \
|
||||
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
||||
|
|
|
|||
|
|
@ -180,8 +180,6 @@ meson setup build \
|
|||
-D crypto=$_WITH_CRYPTO \
|
||||
-D docs=$_WITH_DOCS \
|
||||
\
|
||||
-D ebpf=false \
|
||||
\
|
||||
-D iwd=true \
|
||||
-D ofono=true \
|
||||
-D teamdctl=$_WITH_LIBTEAM \
|
||||
|
|
|
|||
14
meson.build
14
meson.build
|
|
@ -477,19 +477,6 @@ if enable_selinux
|
|||
endif
|
||||
config_h.set10('HAVE_SELINUX', enable_selinux)
|
||||
|
||||
# eBPF support
|
||||
ebpf_opt = get_option('ebpf')
|
||||
# 'auto' means 'false', because there are still issues.
|
||||
if ebpf_opt != 'true'
|
||||
enable_ebpf = false
|
||||
else
|
||||
enable_ebpf = true
|
||||
if not cc.has_header('linux/bpf.h')
|
||||
assert(ebpf_opt != 'true', 'eBPF requires kernel support')
|
||||
enable_ebpf = false
|
||||
endif
|
||||
endif
|
||||
|
||||
# libaudit support
|
||||
libaudit = get_option('libaudit')
|
||||
enable_libaudit = libaudit.contains('yes')
|
||||
|
|
@ -1160,6 +1147,5 @@ output += 'have-nss: ' + crypto_nss_dep.found().to_string() + ')\n'
|
|||
output += ' sanitizers: ' + get_option('b_sanitize') + '\n'
|
||||
output += ' Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'
|
||||
output += ' vapi: ' + enable_vapi.to_string() + '\n'
|
||||
output += ' ebpf: ' + enable_ebpf.to_string() + '\n'
|
||||
output += ' readline: ' + with_readline + '\n'
|
||||
message(output)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ option('nmcli', type: 'boolean', value: true, description: 'Build nmcli')
|
|||
option('nmtui', type: 'boolean', value: true, description: 'Build nmtui')
|
||||
option('nm_cloud_setup', type: 'boolean', value: true, description: 'Build nm-cloud-setup, a tool for automatically configuring networking in cloud')
|
||||
option('bluez5_dun', type: 'boolean', value: false, description: 'enable Bluez5 DUN support')
|
||||
option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: 'Enable eBPF support')
|
||||
option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: 'Enable eBPF support (deprecated)')
|
||||
option('nbft', type: 'boolean', value: true, description: 'Enable NBFT support in the initrd generator')
|
||||
|
||||
# configuration plugins
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ libn_acd = static_library(
|
|||
'n-acd/src/n-acd.c',
|
||||
'n-acd/src/n-acd-probe.c',
|
||||
'n-acd/src/util/timer.c',
|
||||
enable_ebpf ? 'n-acd/src/n-acd-bpf.c' : 'n-acd/src/n-acd-bpf-fallback.c',
|
||||
'n-acd/src/n-acd-bpf.c',
|
||||
),
|
||||
include_directories: include_directories(
|
||||
'c-list/src',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue