From: Jakub Ružička Date: Thu, 22 Jul 2021 12:17:57 +0000 (+0200) Subject: rpm: disable XDP on ARM X-Git-Tag: v3.1.0~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b0a4550e390dca7f8953b1843e73747032e1416;p=thirdparty%2Fknot-dns.git rpm: disable XDP on ARM This is a temporary solution until issues with XDP on ARM are resolved. --- diff --git a/distro/pkg/rpm/knot.spec b/distro/pkg/rpm/knot.spec index abff531aee..a0110b23ed 100644 --- a/distro/pkg/rpm/knot.spec +++ b/distro/pkg/rpm/knot.spec @@ -63,12 +63,22 @@ BuildRequires: lmdb-devel BuildRequires: python3-sphinx BuildRequires: pkgconfig(lmdb) %endif + +%ifarch aarch64 %{arm} +# disable XDP on ARM until issues are resolved +%define configure_xdp --enable-xdp=no +%else +%if 0%{?fedora} >= 31 +# XDP is auto-enabled when libbpf is present +%define use_xdp 1 +BuildRequires: pkgconfig(libbpf) >= 0.0.6 +%endif %if 0%{?rhel} >= 8 || 0%{?suse_version} +# enable XDP on EL using embedded libbpf +%define use_xdp 1 %define configure_xdp --enable-xdp=yes BuildRequires: pkgconfig(libelf) %endif -%if 0%{?fedora} >= 31 -BuildRequires: pkgconfig(libbpf) >= 0.0.6 %endif Requires(post): systemd %{_sbindir}/runuser @@ -271,7 +281,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/knot.conf &>/dev/null || : %{_bindir}/khost %{_bindir}/knsec3hash %{_bindir}/knsupdate -%if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora} >= 31 +%if 0%{?use_xdp} %{_sbindir}/kxdpgun %{_mandir}/man8/kxdpgun.* %endif