diff mbox series

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

Message ID 1611255105-18414-1-git-send-email-yihung.wei@gmail.com
State Changes Requested
Headers show
Series [ovs-dev] rhel: Add option to enable AF_XDP on rpm package | expand

Commit Message

Yi-Hung Wei Jan. 21, 2021, 6:51 p.m. UTC
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@gmail.com>
---
 rhel/openvswitch-fedora.spec.in | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Yifeng Sun Feb. 1, 2021, 10:01 p.m. UTC | #1
LGTM, thanks.

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

On Thu, Jan 21, 2021 at 10:57 AM Yi-Hung Wei <yihung.wei@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@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@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ilya Maximets Feb. 2, 2021, 5:32 p.m. UTC | #2
On 1/21/21 7:51 PM, Yi-Hung Wei 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"

Thanks!
This change looks good to me in general.

Could you, please, also update Documentation/intro/install/fedora.rst
with this new option?

Best regards, Ilya Maximets.
Yi-Hung Wei Feb. 4, 2021, 12:34 a.m. UTC | #3
On Tue, Feb 2, 2021 at 9:32 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 1/21/21 7:51 PM, Yi-Hung Wei 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"
>
> Thanks!
> This change looks good to me in general.
>
> Could you, please, also update Documentation/intro/install/fedora.rst
> with this new option?
>
> Best regards, Ilya Maximets.

Thanks for Yifeng and Ilya for review.

Please find the v2 with the documentation update here:
https://patchwork.ozlabs.org/project/openvswitch/patch/1612398452-114205-1-git-send-email-yihung.wei@gmail.com/

Thanks,

-Yi-Hung
diff mbox series

Patch

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 \