This patch adds an RPMBUILD_OPT so that user can enable AF_XDP support in the rpm package by:
$ make rpm-fedora RPMBUILD_OPT="--with afxdp" Signed-off-by: Yi-Hung Wei <yihung....@gmail.com> --- Documentation/intro/install/fedora.rst | 7 +++++++ rhel/openvswitch-fedora.spec.in | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/intro/install/fedora.rst b/Documentation/intro/install/fedora.rst index 4a2f3507cbbb..06a0bd3d59e1 100644 --- a/Documentation/intro/install/fedora.rst +++ b/Documentation/intro/install/fedora.rst @@ -117,6 +117,13 @@ can be added: $ make rpm-fedora RPMBUILD_OPT="--with dpdk --without check" +To enable AF_XDP support in the openvswitch package, the ``--with afxdp`` +option can be added: + +:: + + $ make rpm-fedora RPMBUILD_OPT="--with afxdp --without check" + You can also have the above commands automatically run the Open vSwitch unit tests. This can take several minutes. diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 2c0c4fa186a3..e03b26b6af34 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -28,6 +28,8 @@ %bcond_without libcapng # To enable DPDK support, specify '--with dpdk' when building %bcond_with dpdk +# To enable AF_XDP support, specify '--with afxdp' when building +%bcond_with afxdp # If there is a need to automatically enable the package after installation, # specify the "--with autoenable" @@ -73,6 +75,9 @@ BuildRequires: libpcap-devel numactl-devel BuildRequires: dpdk-devel >= 17.05.1 Provides: %{name}-dpdk = %{version}-%{release} %endif +%if %{with afxdp} +BuildRequires: libbpf-devel numactl-devel +%endif BuildRequires: unbound unbound-devel Requires: openssl hostname iproute module-init-tools unbound @@ -164,6 +169,9 @@ This package provides IPsec tunneling support for OVS tunnels. %if %{with dpdk} --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ %endif +%if %{with afxdp} + --enable-afxdp \ +%endif --enable-ssl \ --disable-static \ --enable-shared \ -- 2.7.4 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev