[ovs-dev] [PATCH] rhel: Add option to enable AF_XDP on rpm package

Yifeng Sun pkusunyifeng at gmail.com
Mon Feb 1 22:01:56 UTC 2021


LGTM, thanks.

Tested-by: Yifeng Sun <pkusunyifeng at gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>

On Thu, Jan 21, 2021 at 10:57 AM Yi-Hung Wei <yihung.wei at gmail.com> wrote:

> 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.wei at gmail.com>
> ---
>  rhel/openvswitch-fedora.spec.in | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> 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
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list