diff --git a/networking/openvswitch/centos/build_srpm.data b/networking/openvswitch/centos/build_srpm.data index b98158431..3e3f7a532 100644 --- a/networking/openvswitch/centos/build_srpm.data +++ b/networking/openvswitch/centos/build_srpm.data @@ -1,3 +1,6 @@ -COPY_LIST="files/*" +COPY_LIST="files/* \ + $PATCHES_BASE/* \ + $STX_BASE/downloads/openvswitch-2.11.0.tar.gz \ + $STX_BASE/downloads/dpdk-18.11.tar.xz" TIS_PATCH_VER=1 BUILD_IS_SLOW=12 diff --git a/networking/openvswitch/centos/meta_patches/0001-update-package-versioning-for-TIS-format.patch b/networking/openvswitch/centos/meta_patches/0001-update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 04cd04bd4..000000000 --- a/networking/openvswitch/centos/meta_patches/0001-update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cfa7930a4bf0b0e798f1492cd75e37f66c1f5319 Mon Sep 17 00:00:00 2001 -From: Matt Peters -Date: Mon, 28 May 2018 08:14:24 -0500 -Subject: [PATCH] update package versioning for TIS format - ---- - SPECS/openvswitch.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index e007992..71b4634 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -46,7 +46,7 @@ URL: http://www.openvswitch.org/ - # Carried over from 2.6.1 CBS builds, introduced to win over 2.6.90 - Epoch: 1 - Version: 2.9.0 --Release: 3%{?commit0:.%{date}git%{shortcommit0}}%{?dist} -+Release: 3.el7%{?_tis_dist}.%{tis_patch_ver} - - # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the - # lib/sflow*.[ch] files are SISSL --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/meta_patches/0002-dpdk-usertools.patch b/networking/openvswitch/centos/meta_patches/0002-dpdk-usertools.patch deleted file mode 100644 index fb52f742c..000000000 --- a/networking/openvswitch/centos/meta_patches/0002-dpdk-usertools.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f1173c242506fb5d1b311efe2f7d657b04ae6b24 Mon Sep 17 00:00:00 2001 -From: Matt Peters -Date: Fri, 15 Jun 2018 13:37:14 -0500 -Subject: [PATCH] dpdk usertools - ---- - SPECS/openvswitch.spec | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index 71b4634..22bdec9 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -150,6 +150,7 @@ BuildRequires: libcap-ng libcap-ng-devel - %ifarch %{dpdkarches} - # DPDK driver dependencies - BuildRequires: zlib-devel libpcap-devel numactl-devel -+Requires: python-pyelftools - - # Virtual provide for depending on DPDK-enabled OVS - Provides: openvswitch-dpdk = %{version}-%{release} -@@ -421,6 +422,13 @@ install -p -D -m 0755 \ - touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db - touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf - -+%if %{with dpdk} -+%ifarch %{dpdkarches} -+ install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-pmdinfo.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py -+ install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-devbind.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-devbind.py -+%endif -+%endif -+ - # remove unpackaged files - rm -f $RPM_BUILD_ROOT/%{_bindir}/ovs-benchmark \ - $RPM_BUILD_ROOT/%{_bindir}/ovs-docker \ -@@ -656,6 +664,9 @@ fi - %{_datadir}/openvswitch/scripts/ovs-vtep - %{_datadir}/openvswitch/scripts/ovs-ctl - %{_datadir}/openvswitch/scripts/ovs-systemd-reload -+%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py -+%{_datadir}/openvswitch/scripts/dpdk-devbind.py -+%exclude %{_datadir}/openvswitch/scripts/*.py[oc] - %config %{_datadir}/openvswitch/vswitch.ovsschema - %config %{_datadir}/openvswitch/vtep.ovsschema - %{_bindir}/ovs-appctl --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/meta_patches/0003-run-services-as-root-user.patch b/networking/openvswitch/centos/meta_patches/0003-run-services-as-root-user.patch deleted file mode 100644 index ae5e378a9..000000000 --- a/networking/openvswitch/centos/meta_patches/0003-run-services-as-root-user.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 45378c59ffd64d2cf17aa2944489075e6940ab39 Mon Sep 17 00:00:00 2001 -From: Matt Peters -Date: Tue, 29 May 2018 11:58:36 -0500 -Subject: [PATCH] 0003-run-services-as-root-user.patch - ---- - SPECS/openvswitch.spec | 19 +------------------ - 1 file changed, 1 insertion(+), 18 deletions(-) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index 6950479..6fc2b67 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -103,6 +103,7 @@ ExclusiveArch: x86_64 aarch64 ppc64le s390x - %define dpdktarget %{dpdk_mach_arch}-%{dpdk_mach_tmpl}-linuxapp-gcc - - # ovs-patches -+Patch01: run-services-as-root-user.patch - - # OVS (including OVN) backports (0 - 300) - -@@ -508,24 +509,6 @@ rm -rf $RPM_BUILD_ROOT - fi - %endif - --%post --if [ $1 -eq 1 ]; then -- getent passwd openvswitch >/dev/null || \ -- useradd -r -d / -s /sbin/nologin -c "Open vSwitch Daemons" openvswitch -- -- sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch -- -- getent group hugetlbfs >/dev/null || \ -- groupadd hugetlbfs -- usermod -a -G hugetlbfs openvswitch -- sed -i \ -- 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ -- /etc/sysconfig/openvswitch -- -- # In the case of upgrade, this is not needed. -- chown -R openvswitch:openvswitch /etc/openvswitch --fi -- - %if 0%{?systemd_post:1} - %systemd_post %{name}.service - %else --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/meta_patches/0004-rpm-check-with-condition.patch b/networking/openvswitch/centos/meta_patches/0004-rpm-check-with-condition.patch deleted file mode 100644 index c6f6407a7..000000000 --- a/networking/openvswitch/centos/meta_patches/0004-rpm-check-with-condition.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 39471b1f12131cfa74e272e73c38eb830d89f1bd Mon Sep 17 00:00:00 2001 -From: Matt Peters -Date: Tue, 12 Jun 2018 14:41:25 -0500 -Subject: [PATCH] rpm check with condition - ---- - SPECS/openvswitch.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index c51d53f..432c9ed 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -25,7 +25,7 @@ - # https://bugzilla.redhat.com/show_bug.cgi?id=1105458#c10 - # "ofproto-dpif - select group with dp_hash selection method" test is broken on armv7lh - %ifarch x86_64 aarch64 ppc64le --%bcond_without check -+%bcond_with check - %else - %bcond_with check - %endif --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/meta_patches/0005-enable-mlx-pmds.patch b/networking/openvswitch/centos/meta_patches/0005-enable-mlx-pmds.patch deleted file mode 100644 index 621aa9e84..000000000 --- a/networking/openvswitch/centos/meta_patches/0005-enable-mlx-pmds.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/SOURCES/x86_64-native-linuxapp-gcc-config b/SOURCES/x86_64-native-linuxapp-gcc-config -index f81d420..eab161c 100644 ---- a/SOURCES/x86_64-native-linuxapp-gcc-config -+++ b/SOURCES/x86_64-native-linuxapp-gcc-config -@@ -197,12 +197,12 @@ CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n - CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y - CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y - # Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD --CONFIG_RTE_LIBRTE_MLX4_PMD=n -+CONFIG_RTE_LIBRTE_MLX4_PMD=y - CONFIG_RTE_LIBRTE_MLX4_DEBUG=n - CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n - CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 - # Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD --CONFIG_RTE_LIBRTE_MLX5_PMD=n -+CONFIG_RTE_LIBRTE_MLX5_PMD=y - CONFIG_RTE_LIBRTE_MLX5_DEBUG=n - CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8 - # Compile burst-oriented Broadcom PMD driver -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index 29255d5..f392e95 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -151,6 +151,7 @@ BuildRequires: libcap-ng libcap-ng-devel - %ifarch %{dpdkarches} - # DPDK driver dependencies - BuildRequires: zlib-devel libpcap-devel numactl-devel -+BuildRequires: rdma-core-devel - Requires: python-pyelftools - - # Virtual provide for depending on DPDK-enabled OVS -@@ -352,7 +353,12 @@ cd - - --dpdk \ - < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ - > rhel/usr_lib_systemd_system_ovs-vswitchd.service --make %{?_smp_mflags} -+make %{?_smp_mflags} \ -+%if %{with dpdk} -+%ifarch %{dpdkarches} -+ LDFLAGS="-libverbs -lmlx4 -lmlx5" -+%endif -+%endif - - %install - rm -rf $RPM_BUILD_ROOT diff --git a/networking/openvswitch/centos/meta_patches/0006-iommu-width-fix.patch b/networking/openvswitch/centos/meta_patches/0006-iommu-width-fix.patch deleted file mode 100644 index 9e616fa5e..000000000 --- a/networking/openvswitch/centos/meta_patches/0006-iommu-width-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 78489fa5c3e98ac9db6244a6707622b4603bf0cb Mon Sep 17 00:00:00 2001 -From: Hayde Martinez -Date: Thu, 11 Oct 2018 14:44:00 -0500 -Subject: [PATCH] iommu-width-fix - -Signed-off-by: Hayde Martinez ---- - SPECS/openvswitch.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index 29255d5..a3a1c87 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -104,6 +104,7 @@ ExclusiveArch: x86_64 aarch64 ppc64le s390x - - # ovs-patches - Patch01: run-services-as-root-user.patch -+Patch02: iommu-width-fix.patch - - # OVS (including OVN) backports (0 - 300) - --- -2.7.4 - diff --git a/networking/openvswitch/centos/meta_patches/0007-net-mlx5-fix-memory-region-cache-lookup.patch b/networking/openvswitch/centos/meta_patches/0007-net-mlx5-fix-memory-region-cache-lookup.patch deleted file mode 100644 index a65013114..000000000 --- a/networking/openvswitch/centos/meta_patches/0007-net-mlx5-fix-memory-region-cache-lookup.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5cabd4876e772f59a18a71a15f8fdfac0b0cf0ea Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Wed, 17 Oct 2018 09:54:53 -0400 -Subject: [PATCH] net-mlx5-fix-memory-region-cache-lookup - ---- - SPECS/openvswitch.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec -index f286a13..6d95f35 100644 ---- a/SPECS/openvswitch.spec -+++ b/SPECS/openvswitch.spec -@@ -123,7 +123,7 @@ Patch422: 0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch - Patch423: 0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch - Patch424: 0005-vhost-add-flag-for-built-in-virtio-driver.patch - Patch425: 0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch -- -+Patch426: net-mlx5-fix-memory-region-cache-lookup.patch - - BuildRequires: gcc - BuildRequires: python2-sphinx --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/meta_patches/PATCH_ORDER b/networking/openvswitch/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 9fcda3431..000000000 --- a/networking/openvswitch/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,6 +0,0 @@ -0001-update-package-versioning-for-TIS-format.patch -0002-dpdk-usertools.patch -0003-run-services-as-root-user.patch -0004-rpm-check-with-condition.patch -0006-iommu-width-fix.patch -0007-net-mlx5-fix-memory-region-cache-lookup.patch diff --git a/networking/openvswitch/centos/openvswitch.spec b/networking/openvswitch/centos/openvswitch.spec new file mode 100644 index 000000000..fa49f39fa --- /dev/null +++ b/networking/openvswitch/centos/openvswitch.spec @@ -0,0 +1,1016 @@ +# Uncomment these for snapshot releases: +# commit0 is the git sha of the last commit +# date is the date YYYYMMDD of the snapshot +#%%global commit0 bd916d13dbb845746983a6780da772154df647ba +#%%global date 20180219 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +# If wants to run tests while building, specify the '--with check' +# option. For example: +# rpmbuild -bb --with check openvswitch.spec + +# Enable PIE, bz#955181 +%global _hardened_build 1 + +# RHEL-7 doesn't define _rundir macro yet +# Fedora 15 onwards uses /run as _rundir +%if 0%{!?_rundir:1} +%define _rundir /run +%endif + +# To disable DPDK support, specify '--without dpdk' when building +%bcond_without dpdk + +# test-suite is broken for big endians +# https://bugzilla.redhat.com/show_bug.cgi?id=1105458#c10 +# "ofproto-dpif - select group with dp_hash selection method" test is broken on armv7lh +%ifarch x86_64 aarch64 ppc64le +%bcond_with check +%else +%bcond_with check +%endif +# option to run kernel datapath tests, requires building as root! +%bcond_with check_datapath_kernel +# option to build with libcap-ng, needed for running OVS as regular user +%bcond_without libcapng +# option to build openvswitch-ovn-docker package +%bcond_with ovn_docker + +%if 0%{?fedora} +%global with_python3 1 +%endif + +Name: openvswitch +Summary: Open vSwitch daemon/database/utilities +URL: http://www.openvswitch.org/ +# Carried over from 2.6.1 CBS builds, introduced to win over 2.6.90 +Epoch: 1 +Version: 2.11.0 +Release: 0%{?_tis_dist}.%{tis_patch_ver} + +# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the +# lib/sflow*.[ch] files are SISSL +# datapath/ is GPLv2 (although not built into any of the binary packages) +License: ASL 2.0 and LGPLv2+ and SISSL + +%define dpdkver 18.11 +%define dpdkdir dpdk +%define dpdksver %(echo %{dpdkver} | cut -d. -f-2) +# NOTE: DPDK does not currently build for s390x +%define dpdkarches x86_64 aarch64 ppc64le + +%if 0%{?commit0:1} +Source: https://github.com/openvswitch/ovs/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz +%else +Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz +%endif +Source10: http://fast.dpdk.org/rel/dpdk-%{dpdkver}.tar.xz + +Source500: configlib.sh +Source501: gen_config_group.sh +Source502: set_config.sh + +Source506: x86_64-native-linuxapp-gcc-config + +# The DPDK is designed to optimize througput of network traffic using, among +# other techniques, carefully crafted assembly instructions. As such it +# needs extensive work to port it to other architectures. +ExclusiveArch: x86_64 aarch64 ppc64le s390x + +# dpdk_mach_arch maps between rpm and dpdk arch name, often same as _target_cpu +# dpdk_mach_tmpl is the config template dpdk_mach name, often "native" +# dpdk_mach is the actual dpdk_mach name used in the dpdk make system +%ifarch x86_64 +%define dpdk_mach_arch x86_64 +%define dpdk_mach_tmpl native +%define dpdk_mach default +%endif + +%define dpdktarget %{dpdk_mach_arch}-%{dpdk_mach_tmpl}-linuxapp-gcc + +# ovs-patches +Patch01: run-services-as-root-user.patch + +BuildRequires: gcc +BuildRequires: python2-sphinx +BuildRequires: autoconf automake libtool +BuildRequires: systemd-units openssl openssl-devel +BuildRequires: python2-devel python2-six +%if 0%{?with_python3} +BuildRequires: python3-devel python3-six +%endif +BuildRequires: desktop-file-utils +BuildRequires: groff-base graphviz +# make check dependencies +BuildRequires: procps-ng +BuildRequires: python2-pyOpenSSL +%if %{with check_datapath_kernel} +BuildRequires: nmap-ncat +# would be useful but not available in RHEL or EPEL +#BuildRequires: python2-pyftpdlib +%endif + +%if %{with libcapng} +BuildRequires: libcap-ng libcap-ng-devel +%endif + +%if %{with dpdk} +%ifarch %{dpdkarches} +# DPDK driver dependencies +BuildRequires: zlib-devel libpcap-devel numactl-devel +BuildRequires: rdma-core-devel +BuildRequires: libmnl-devel +Requires: python-pyelftools + +# Virtual provide for depending on DPDK-enabled OVS +Provides: openvswitch-dpdk = %{version}-%{release} +# Migration path for openvswitch-dpdk package +Obsoletes: openvswitch-dpdk < 2.6.0 +# Required by packaging policy for the bundled DPDK +Provides: bundled(dpdk) = %{dpdkver} +%endif +%endif + +Requires: openssl iproute module-init-tools +#Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 +#Requires: kernel >= 3.15.0-0 + +Requires(post): /usr/bin/getent +Requires(post): /usr/sbin/useradd +Requires(post): /bin/sed +Requires(post): /usr/sbin/usermod +Requires(post): /usr/sbin/groupadd +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +Obsoletes: openvswitch-controller <= 0:2.1.0-1 + +%description +Open vSwitch provides standard network bridging functions and +support for the OpenFlow protocol for remote per-flow control of +traffic. + +%package -n python2-openvswitch +Summary: Open vSwitch python2 bindings +License: ASL 2.0 +BuildArch: noarch +Requires: python2 python2-six +Obsoletes: python-openvswitch < %{epoch}:2.7.2 +Provides: python-openvswitch = %{epoch}:%{version}-%{release} + +%description -n python2-openvswitch +Python bindings for the Open vSwitch database + +%if 0%{?with_python3} +%package -n python3-openvswitch +Summary: Open vSwitch python3 bindings +License: ASL 2.0 +BuildArch: noarch +Requires: python3 python3-six + +%description -n python3-openvswitch +Python bindings for the Open vSwitch database +%endif + +%package test +Summary: Open vSwitch testing utilities +License: ASL 2.0 +BuildArch: noarch +Requires: python2-openvswitch = %{epoch}:%{version}-%{release} +Requires: python2 python2-twisted + +%description test +Utilities that are useful to diagnose performance and connectivity +issues in Open vSwitch setup. + +%package devel +Summary: Open vSwitch OpenFlow development package (library, headers) +License: ASL 2.0 +Provides: openvswitch-static = %{epoch}:%{version}-%{release} + +%description devel +This provides static library, libopenswitch.a and the openvswitch header +files needed to build an external application. + +%package ovn-central +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common +Requires: firewalld-filesystem + +%description ovn-central +OVN, the Open Virtual Network, is a system to support virtual network +abstraction. OVN complements the existing capabilities of OVS to add +native support for virtual network abstractions, such as virtual L2 and L3 +overlays and security groups. + +%package ovn-host +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common +Requires: firewalld-filesystem + +%description ovn-host +OVN, the Open Virtual Network, is a system to support virtual network +abstraction. OVN complements the existing capabilities of OVS to add +native support for virtual network abstractions, such as virtual L2 and L3 +overlays and security groups. + +%package ovn-vtep +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common + +%description ovn-vtep +OVN vtep controller + +%package ovn-common +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch + +%description ovn-common +Utilities that are use to diagnose and manage the OVN components. + +%if %{with ovn_docker} +%package ovn-docker +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common python2-openvswitch + +%description ovn-docker +Docker network plugins for OVN. +%endif + +%prep +%if 0%{?commit0:1} +%autosetup -n ovs-%{commit0} -a 10 -p 1 +%else +%autosetup -a 10 -p 1 +%endif + +%build +%if 0%{?commit0:1} +# fix the snapshot unreleased version to be the released one. +sed -i.old -e "s/^AC_INIT(openvswitch,.*,/AC_INIT(openvswitch, %{version},/" configure.ac +%endif +./boot.sh + +%if %{with dpdk} +%ifarch %{dpdkarches} # build dpdk +# Lets build DPDK first +cd %{dpdkdir}-%{dpdkver} + +# In case dpdk-devel is installed +unset RTE_SDK RTE_INCLUDE RTE_TARGET + +# Avoid appending second -Wall to everything, it breaks upstream warning +# disablers in makefiles. Strip explicit -march= from optflags since they +# will only guarantee build failures, DPDK is picky with that. +export EXTRA_CFLAGS="$(echo %{optflags} | sed -e 's:-Wall::g' -e 's:-march=[[:alnum:]]* ::g') -Wformat -fPIC" + +# DPDK defaults to using builder-specific compiler flags. However, +# the config has been changed by specifying CONFIG_RTE_MACHINE=default +# in order to build for a more generic host. NOTE: It is possible that +# the compiler flags used still won't work for all Fedora-supported +# machines, but runtime checks in DPDK will catch those situations. + +make V=1 O=%{dpdktarget} T=%{dpdktarget} %{?_smp_mflags} config + +cp -f %{SOURCE500} %{SOURCE502} "%{_sourcedir}/%{dpdktarget}-config" . +%{SOURCE502} %{dpdktarget}-config "%{dpdktarget}/.config" + +make V=1 O=%{dpdktarget} %{?_smp_mflags} + +# Generate a list of supported drivers, its hard to tell otherwise. +cat << EOF > README.DPDK-PMDS +DPDK drivers included in this package: + +EOF + +for f in $(ls %{dpdk_mach_arch}-%{dpdk_mach_tmpl}-linuxapp-gcc/lib/lib*_pmd_*); do + basename ${f} | cut -c12- | cut -d. -f1 | tr [:lower:] [:upper:] +done >> README.DPDK-PMDS + +cat << EOF >> README.DPDK-PMDS + +For further information about the drivers, see +http://dpdk.org/doc/guides-%{dpdksver}/nics/index.html +EOF + +cd - +%endif # build dpdk +%endif + +# And now for OVS... +%configure \ +%if %{with libcapng} + --enable-libcapng \ +%else + --disable-libcapng \ +%endif + --enable-ssl \ +%if %{with dpdk} +%ifarch %{dpdkarches} + --with-dpdk=$(pwd)/%{dpdkdir}-%{dpdkver}/%{dpdktarget} \ +%endif +%endif + --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ + PYTHON=/usr/bin/python2 +/usr/bin/python2 build-aux/dpdkstrip.py \ + --dpdk \ + < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ + > rhel/usr_lib_systemd_system_ovs-vswitchd.service +make %{?_smp_mflags} \ +%if %{with dpdk} +%ifarch %{dpdkarches} + LDFLAGS="-libverbs -lmlx4 -lmlx5" +%endif +%endif + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch +install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch +install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch + +install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \ + $RPM_BUILD_ROOT%{_udevrulesdir}/91-vfio.rules + +install -p -D -m 0644 \ + rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch + +for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \ + ovn-controller ovn-controller-vtep ovn-northd; do + install -p -D -m 0644 \ + rhel/usr_lib_systemd_system_${service}.service \ + $RPM_BUILD_ROOT%{_unitdir}/${service}.service +done + +install -m 0755 rhel/etc_init.d_openvswitch \ + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init + +install -p -D -m 0644 rhel/etc_openvswitch_default.conf \ + $RPM_BUILD_ROOT/%{_sysconfdir}/openvswitch/default.conf + +install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \ + $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch + +install -m 0644 vswitchd/vswitch.ovsschema \ + $RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema + +install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ +install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \ + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs +install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \ + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs + +install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib} +cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \ + $RPM_BUILD_ROOT%{python2_sitelib} +%if 0%{?with_python3} +install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib} +cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \ + $RPM_BUILD_ROOT%{python3_sitelib} +%endif +rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ + +install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch + +install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ +install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ + $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml +install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ + $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml + +install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn +ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ + $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers + +install -p -D -m 0755 \ + rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \ + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-systemd-reload + +touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db +touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf + +%if %{with dpdk} +%ifarch %{dpdkarches} + install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-pmdinfo.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py + install -m 0755 %{dpdkdir}-%{dpdkver}/usertools/dpdk-devbind.py $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/dpdk-devbind.py +%endif +%endif + +# remove unpackaged files +rm -f $RPM_BUILD_ROOT/%{_bindir}/ovs-benchmark \ + $RPM_BUILD_ROOT/%{_bindir}/ovs-docker \ + $RPM_BUILD_ROOT/%{_bindir}/ovs-parse-backtrace \ + $RPM_BUILD_ROOT/%{_bindir}/ovs-testcontroller \ + $RPM_BUILD_ROOT/%{_sbindir}/ovs-vlan-bug-workaround \ + $RPM_BUILD_ROOT/%{_mandir}/man1/ovs-benchmark.1* \ + $RPM_BUILD_ROOT/%{_mandir}/man8/ovs-testcontroller.* \ + $RPM_BUILD_ROOT/%{_mandir}/man8/ovs-vlan-bug-workaround.8* + +%if %{without ovn_docker} +rm -f $RPM_BUILD_ROOT/%{_bindir}/ovn-docker-overlay-driver \ + $RPM_BUILD_ROOT/%{_bindir}/ovn-docker-underlay-driver +%endif + +%check +%if %{with check} + if make check TESTSUITEFLAGS='%{_smp_mflags}' || + make check TESTSUITEFLAGS='--recheck'; then :; + else + cat tests/testsuite.log + exit 1 + fi +%endif +%if %{with check_datapath_kernel} + if make check-kernel RECHECK=yes; then :; + else + cat tests/system-kmod-testsuite.log + exit 1 + fi +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%preun +%if 0%{?systemd_preun:1} + %systemd_preun %{name}.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : + /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : + fi +%endif + +%preun ovn-central +%if 0%{?systemd_preun:1} + %systemd_preun ovn-northd.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : + fi +%endif + +%preun ovn-host +%if 0%{?systemd_preun:1} + %systemd_preun ovn-controller.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : + fi +%endif + +%preun ovn-vtep +%if 0%{?systemd_preun:1} + %systemd_preun ovn-controller-vtep.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : + fi +%endif + +%if 0%{?systemd_post:1} + %systemd_post %{name}.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif + +%post ovn-central +%if 0%{?systemd_post:1} + %systemd_post ovn-northd.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif + +%post ovn-host +%if 0%{?systemd_post:1} + %systemd_post ovn-controller.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif + +%post ovn-vtep +%if 0%{?systemd_post:1} + %systemd_post ovn-controller-vtep.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif +%postun ovn-central +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-northd.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || : + fi +%endif + +%postun ovn-host +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-controller.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || : + fi +%endif + +%postun ovn-vtep +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-controller-vtep.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || : + fi +%endif + +%postun +%if 0%{?systemd_postun:1} + %systemd_postun %{name}.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +%endif + + +%files -n python2-openvswitch +%{python2_sitelib}/ovs + +%if 0%{?with_python3} +%files -n python3-openvswitch +%{python3_sitelib}/ovs +%endif + +%files test +%{_bindir}/ovs-test +%{_bindir}/ovs-vlan-test +%{_bindir}/ovs-l3ping +%{_bindir}/ovs-pcap +%{_bindir}/ovs-tcpdump +%{_bindir}/ovs-tcpundump +%{_mandir}/man8/ovs-test.8* +%{_mandir}/man8/ovs-vlan-test.8* +%{_mandir}/man8/ovs-l3ping.8* +%{_mandir}/man1/ovs-pcap.1* +%{_mandir}/man8/ovs-tcpdump.8* +%{_mandir}/man1/ovs-tcpundump.1* +%{python2_sitelib}/ovstest + +%files devel +%{_libdir}/*.a +%{_libdir}/*.la +%{_libdir}/pkgconfig/*.pc +%{_includedir}/openvswitch/* +%{_includedir}/openflow/* +%{_includedir}/ovn/* + +%files +%defattr(-,openvswitch,openvswitch) +%verify(not owner group) %dir %{_sysconfdir}/openvswitch +%verify(not owner group) %{_sysconfdir}/openvswitch/default.conf +%config %ghost %verify(not owner group md5 size mtime) %{_sysconfdir}/openvswitch/conf.db +%config %ghost %verify(not owner group md5 size mtime) %{_sysconfdir}/openvswitch/system-id.conf +%config(noreplace) %verify(not owner group md5 size mtime) %{_sysconfdir}/sysconfig/openvswitch +%defattr(-,root,root) +%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash +%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash +%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch +%{_unitdir}/openvswitch.service +%{_unitdir}/ovsdb-server.service +%{_unitdir}/ovs-vswitchd.service +%{_unitdir}/ovs-delete-transient-ports.service +%{_datadir}/openvswitch/scripts/openvswitch.init +%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs +%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs +%{_datadir}/openvswitch/bugtool-plugins/ +%{_datadir}/openvswitch/scripts/ovs-bugtool-* +%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs +%{_datadir}/openvswitch/scripts/ovs-lib +%{_datadir}/openvswitch/scripts/ovs-save +%{_datadir}/openvswitch/scripts/ovs-vtep +%{_datadir}/openvswitch/scripts/ovs-ctl +%{_datadir}/openvswitch/scripts/ovs-kmod-ctl +%{_datadir}/openvswitch/scripts/ovs-monitor-ipsec +%{_datadir}/openvswitch/scripts/ovs-systemd-reload +%{_datadir}/openvswitch/scripts/dpdk-pmdinfo.py +%{_datadir}/openvswitch/scripts/dpdk-devbind.py +%exclude %{_datadir}/openvswitch/scripts/*.py[oc] +%config %{_datadir}/openvswitch/vswitch.ovsschema +%config %{_datadir}/openvswitch/vtep.ovsschema +%{_bindir}/ovs-appctl +%{_bindir}/ovs-dpctl +%{_bindir}/ovs-dpctl-top +%{_bindir}/ovs-ofctl +%{_bindir}/ovs-vsctl +%{_bindir}/ovsdb-client +%{_bindir}/ovsdb-tool +%{_bindir}/ovs-pki +%{_bindir}/vtep-ctl +%{_sbindir}/ovs-bugtool +%{_sbindir}/ovs-vswitchd +%{_sbindir}/ovsdb-server +%{_mandir}/man1/ovsdb-client.1* +%{_mandir}/man1/ovsdb-server.1* +%{_mandir}/man1/ovsdb-tool.1* +%{_mandir}/man5/ovsdb.5* +%{_mandir}/man5/ovsdb-server.5.* +%{_mandir}/man5/ovs-vswitchd.conf.db.5* +%{_mandir}/man5/vtep.5* +%{_mandir}/man7/ovsdb-server.7* +%{_mandir}/man7/ovsdb.7* +%{_mandir}/man7/ovs-actions.7* +%{_mandir}/man7/ovs-fields.7* +%{_mandir}/man8/vtep-ctl.8* +%{_mandir}/man8/ovs-appctl.8* +%{_mandir}/man8/ovs-bugtool.8* +%{_mandir}/man8/ovs-ctl.8* +%{_mandir}/man8/ovs-dpctl.8* +%{_mandir}/man8/ovs-dpctl-top.8* +%{_mandir}/man8/ovs-kmod-ctl.8* +%{_mandir}/man8/ovs-ofctl.8* +%{_mandir}/man8/ovs-pki.8* +%{_mandir}/man8/ovs-vsctl.8* +%{_mandir}/man8/ovs-vswitchd.8* +%{_mandir}/man8/ovs-parse-backtrace.8* +%{_udevrulesdir}/91-vfio.rules +%doc LICENSE NOTICE README.rst NEWS rhel/README.RHEL.rst +%if %{with dpdk} +%ifarch %{dpdkarches} +%doc dpdk-%{dpdkver}/README.DPDK-PMDS +%endif +%endif +/var/lib/openvswitch +%attr(755,-,-) /var/log/openvswitch +%ghost %attr(755,root,root) %{_rundir}/openvswitch + +%if %{with ovn_docker} +%files ovn-docker +%{_bindir}/ovn-docker-overlay-driver +%{_bindir}/ovn-docker-underlay-driver +%endif + +%files ovn-common +%{_bindir}/ovn-detrace +%{_bindir}/ovn-nbctl +%{_bindir}/ovn-sbctl +%{_bindir}/ovn-trace +%{_datadir}/openvswitch/scripts/ovn-ctl +%{_datadir}/openvswitch/scripts/ovndb-servers.ocf +%{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show +%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list +%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show +%{_mandir}/man1/ovn-detrace.1* +%{_mandir}/man8/ovn-ctl.8* +%{_mandir}/man8/ovn-nbctl.8* +%{_mandir}/man8/ovn-trace.8* +%{_mandir}/man7/ovn-architecture.7* +%{_mandir}/man8/ovn-sbctl.8* +%{_mandir}/man5/ovn-nb.5* +%{_mandir}/man5/ovn-sb.5* +%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers + +%files ovn-central +%{_bindir}/ovn-northd +%{_mandir}/man8/ovn-northd.8* +%config %{_datadir}/openvswitch/ovn-nb.ovsschema +%config %{_datadir}/openvswitch/ovn-sb.ovsschema +%{_unitdir}/ovn-northd.service +%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml + +%files ovn-host +%{_bindir}/ovn-controller +%{_mandir}/man8/ovn-controller.8* +%{_unitdir}/ovn-controller.service +%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml + +%files ovn-vtep +%{_bindir}/ovn-controller-vtep +%{_mandir}/man8/ovn-controller-vtep.8* +%{_unitdir}/ovn-controller-vtep.service + +%changelog +* Tue Feb 20 2018 Iryna Shcherbina - 2.9.0-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Tue Feb 20 2018 Timothy Redaelli - 2.9.0-2 +- Align totally with RHEL "Fast Datapath" channel 2.9.0-1 + +* Tue Feb 20 2018 Timothy Redaelli - 2.9.0-1 +- Update to Open vSwitch 2.9.0 and DPDK 17.11 +- Align with RHEL "Fast Datapath" channel 2.9.0-1 + +* Fri Feb 09 2018 Aaron Conole - 2.8.1-2 +- Update to include 94cd8383e297 and 951d79e638ec from upstream + +* Thu Feb 08 2018 Fedora Release Engineering - 2.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Oct 02 2017 Timothy Redaelli - 2.8.1-1 +- Update to Open vSwitch 2.8.1 + +* Tue Sep 19 2017 Timothy Redaelli - 2.8.0-2 +- Update DPDK to 17.05.2 (bugfixes) + +* Mon Sep 04 2017 Timothy Redaelli - 2.8.0-1 +- Update to Open vSwitch 2.8.0 and DPDK 17.05.1 (#1487971) + +* Thu Aug 03 2017 Fedora Release Engineering - 2.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.7.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Timothy Redaelli - 2.7.2-1 +- Update to Open vSwitch 2.7.2 +- Add a symlink of the OCF script in the OCF resources folder + +* Fri Jul 14 2017 Timothy Redaelli - 2.7.1-2 +- Backport fix for CVE-2017-9263 (#1457327) +- Backport fix for CVE-2017-9265 (#1457335) + +* Thu Jul 06 2017 Timothy Redaelli - 2.7.1-1 +- Updated to Open vSwitch 2.7.1 and DPDK 16.11.2 (#1468234) + +* Tue Jun 13 2017 Timothy Redaelli - 2.7.0-5 +- Backport fix for CVE-2017-9264 (#1457329) + +* Wed Jun 07 2017 Timothy Redaelli - 2.7.0-4 +- Remove PYTHONCOERCECLOCALE=0 workaround and backport upstream patch (#1454364) + +* Wed May 31 2017 Timothy Redaelli - 2.7.0-3 +- Backport fix for CVE-2017-9214 (#1456797) +- Use %%autosetup instead of %%setup + +* Mon May 29 2017 Timothy Redaelli - 2.7.0-2 +- Install OVN firewalld rules + +* Thu May 18 2017 Timothy Redaelli - 2.7.0-1 +- Link statically with DPDK 16.11.1 (#1451476) +- Build OVS without DPDK support on all architectures not supported by DPDK +- Added python3-six to BuildRequires in order to launch python3 tests too +- Export PYTHONCOERCECLOCALE=0 in order to workaround an incompatibility + between Python 3.6.0 (with PEP 538) on Fedora 26+ and testsuite (#1454364) +- Disable tests on armv7hl + +* Fri Feb 24 2017 Timothy Redaelli - 2.7.0-0 +- Updated to Open vSwitch 2.7.0 (#1426596) +- Enable DPDK support + +* Thu Feb 16 2017 Timothy Redaelli - 2.6.1-2 +- Added python3-openvswitch and renamed python-openvswitch to python2-openvswitch + +* Sat Feb 11 2017 Fedora Release Engineering - 2.6.1-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Nov 24 2016 Flavio Leitner - 2.6.1-0 +- Updated to Open vSwitch 2.6.1 + +* Tue Nov 01 2016 Aaron Conole - 2.6.0-0 +- Update to Open vSwitch 2.6.0 +- Enable OVN + +* Wed Aug 24 2016 Dan HorĂ¡k - 2.5.0-4 +- don't run the test-suite for big endian arches + +* Tue Jul 19 2016 Fedora Release Engineering - 2.5.0-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue Mar 15 2016 Panu Matilainen - 2.5.0-2 +- Remove unpackaged files instead of excluding (#1281913) + +* Wed Mar 02 2016 Panu Matilainen - 2.5.0-1 +- Update to 2.5.0 (#1312617) + +* Thu Feb 04 2016 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Aug 24 2015 Flavio Leitner - 2.4.0-1 +- updated to 2.4.0 (#1256171) + +* Thu Jun 18 2015 Flavio Leitner - 2.3.2-1 +- updated to 2.3.2 (#1233442) +- fixed to own /var/run/openvswitch directory (#1200887) + +* Thu Jun 18 2015 Fedora Release Engineering - 2.3.1-4.git20150327 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Mar 27 2015 Flavio Leitner - 2.3.1-3.git20150327 +- updated to 2.3.1-git4750c96 +- commented out kernel requires +- added requires to procps-ng (testsuite #84) + +* Wed Jan 14 2015 Flavio Leitner - 2.3.1-2.git20150113 +- updated to 2.3.1-git3282e51 + +* Fri Dec 05 2014 Flavio Leitner - 2.3.1-1 +- updated to 2.3.1 + +* Fri Nov 07 2014 Flavio Leitner - 2.3.0-3.git20141107 +- updated to 2.3.0-git39ebb203 + +* Thu Oct 23 2014 Flavio Leitner - 2.3.0-2 +- fixed to own conf.db and system-id.conf in /etc/openvswitch. + (#1132707) + +* Tue Aug 19 2014 Flavio Leitner - 2.3.0-1 +- updated to 2.3.0 + +* Sun Aug 17 2014 Fedora Release Engineering - 2.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jun 12 2014 Flavio Leitner - 2.1.2-4 +- moved README.RHEL to be in the standard doc dir. +- added FAQ and NEWS files to the doc list. +- excluded PPC arch + +* Thu Jun 12 2014 Flavio Leitner - 2.1.2-3 +- removed ovsdbmonitor packaging + +* Sat Jun 07 2014 Fedora Release Engineering - 2.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 25 2014 Flavio Leitner - 2.1.2-1 +- updated to 2.1.2 + +* Tue Mar 25 2014 Flavio Leitner - 2.1.0-1 +- updated to 2.1.0 +- obsoleted openvswitch-controller package +- requires kernel 3.15.0-0 or newer + (kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 + openvswitch: fix a possible deadlock and lockdep warning) +- ovs-lib: allow non-root users to check service status + (upstream commit 691e47554dd03dd6492e00bab5bd6d215f5cbd4f) +- rhel: Add Patch Port support to initscripts + (upstream commit e2bcc8ef49f5e51f48983b87ab1010f0f9ab1454) + +* Mon Jan 27 2014 Flavio Leitner - 2.0.1-1 +- updated to 2.0.1 + +* Mon Jan 27 2014 Flavio Leitner - 2.0.0-6 +- create a -devel package + (from Chris Wright ) + +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-5 +- Enable DHCP support for internal ports + (upstream commit 490db96efaf89c63656b192d5ca287b0908a6c77) + +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-4 +- disabled ovsdbmonitor packaging + (upstream has removed the component) + +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-3 +- fedora package: fix systemd ordering and deps. + (upstream commit b49c106ef00438b1c59876dad90d00e8d6e7b627) + +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-2 +- util: use gcc builtins to better check array sizes + (upstream commit 878f1972909b33f27b32ad2ded208eb465b98a9b) + +* Mon Oct 28 2013 Flavio Leitner - 2.0.0-1 +- updated to 2.0.0 (#1023184) + +* Mon Oct 28 2013 Flavio Leitner - 1.11.0-8 +- applied upstream commit 7b75828bf5654c494a53fa57be90713c625085e2 + rhel: Option to create tunnel through ifcfg scripts. + +* Mon Oct 28 2013 Flavio Leitner - 1.11.0-7 +- applied upstream commit 32aa46891af5e173144d672e15fec7c305f9a4f3 + rhel: Set STP of a bridge during bridge creation. + +* Mon Oct 28 2013 Flavio Leitner - 1.11.0-6 +- applied upstream commit 5b56f96aaad4a55a26576e0610fb49bde448dabe + rhel: Prevent duplicate ifup calls. + +* Mon Oct 28 2013 Flavio Leitner - 1.11.0-5 +- applied upstream commit 79416011612541d103a1d396d888bb8c84eb1da4 + rhel: Return an exit value of 0 for ifup-ovs. + +* Mon Oct 28 2013 Flavio Leitner - 1.11.0-4 +- applied upstream commit 2517bad92eec7e5625bc8b248db22fdeaa5fcde9 + Added RHEL ovs-ifup STP option handling + +* Tue Oct 1 2013 Flavio Leitner - 1.11.0-3 +- don't use /var/lock/subsys with systemd (#1006412) + +* Thu Sep 19 2013 Flavio Leitner - 1.11.0-2 +- ovsdbmonitor package is optional + +* Thu Aug 29 2013 Thomas Graf - 1.11.0-1 +- Update to 1.11.0 + +* Tue Aug 13 2013 Flavio Leitner - 1.10.0-7 +- Fixed openvswitch-nonetwork to start openvswitch.service (#996804) + +* Sat Aug 03 2013 Petr Pisar - 1.10.0-6 +- Perl 5.18 rebuild + +* Tue Jul 23 2013 Thomas Graf - 1.10.0-5 +- Typo + +* Tue Jul 23 2013 Thomas Graf - 1.10.0-4 +- Spec file fixes +- Maintain local copy of sysconfig.template + +* Thu Jul 18 2013 Petr Pisar - 1.10.0-3 +- Perl 5.18 rebuild + +* Mon Jul 01 2013 Thomas Graf - 1.10.0-2 +- Enable PIE (#955181) +- Provide native systemd unit files (#818754) + +* Thu May 02 2013 Thomas Graf - 1.10.0-1 +- Update to 1.10.0 (#958814) + +* Thu Feb 28 2013 Thomas Graf - 1.9.0-1 +- Update to 1.9.0 (#916537) + +* Tue Feb 12 2013 Thomas Graf - 1.7.3-8 +- Fix systemd service dependency loop (#818754) + +* Fri Jan 25 2013 Thomas Graf - 1.7.3-7 +- Auto-start openvswitch service on ifup/ifdown (#818754) +- Add OVSREQUIRES to allow defining OpenFlow interface dependencies + +* Thu Jan 24 2013 Thomas Graf - 1.7.3-6 +- Update to Open vSwitch 1.7.3 + +* Tue Nov 20 2012 Thomas Graf - 1.7.1-6 +- Increase max fd limit to support 256 bridges (#873072) + +* Thu Nov 1 2012 Thomas Graf - 1.7.1-5 +- Don't create world writable pki/*/incomming directory (#845351) + +* Thu Oct 25 2012 Thomas Graf - 1.7.1-4 +- Don't add iptables accept rule for -p GRE as GRE tunneling is unsupported + +* Tue Oct 16 2012 Thomas Graf - 1.7.1-3 +- require systemd instead of systemd-units to use macro helpers (#850258) + +* Tue Oct 9 2012 Thomas Graf - 1.7.1-2 +- make ovs-vsctl timeout if daemon is not running (#858722) + +* Mon Sep 10 2012 Thomas Graf - 1.7.1.-1 +- Update to 1.7.1 + +* Fri Sep 7 2012 Thomas Graf - 1.7.0.-3 +- add controller package containing ovs-controller + +* Thu Aug 23 2012 Tomas Hozza - 1.7.0-2 +- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850258) + +* Fri Aug 17 2012 Tomas Hozza - 1.7.0-1 +- Update to 1.7.0 +- Fixed openvswitch-configure-ovskmod-var-autoconfd.patch because + openvswitch kernel module name changed in 1.7.0 +- Removed Source8: ovsdbmonitor-move-to-its-own-data-directory.patch +- Patches merged: + - ovsdbmonitor-move-to-its-own-data-directory-automaked.patch + - openvswitch-rhel-initscripts-resync.patch + +* Fri Jul 20 2012 Fedora Release Engineering - 1.4.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Mar 15 2012 Chris Wright - 1.4.0-5 +- fix ovs network initscripts DHCP address acquisition (#803843) + +* Tue Mar 6 2012 Chris Wright - 1.4.0-4 +- make BuildRequires openssl explicit (needed on f18/rawhide now) + +* Tue Mar 6 2012 Chris Wright - 1.4.0-3 +- use glob to catch compressed manpages + +* Thu Mar 1 2012 Chris Wright - 1.4.0-2 +- Update License comment, use consitent macros as per review comments bz799171 + +* Wed Feb 29 2012 Chris Wright - 1.4.0-1 +- Initial package for Fedora diff --git a/networking/openvswitch/centos/patches/iommu-width-fix.patch b/networking/openvswitch/centos/patches/iommu-width-fix.patch deleted file mode 100644 index 8a817cfe9..000000000 --- a/networking/openvswitch/centos/patches/iommu-width-fix.patch +++ /dev/null @@ -1,131 +0,0 @@ ---- openvswitch-2.9.0/dpdk-17.11/drivers/bus/pci/linux/pci.c 2017-11-15 18:00:28.000000000 +0000 -+++ openvswitch-2.9.0p/dpdk-17.11/drivers/bus/pci/linux/pci.c 2018-10-10 17:59:58.370080207 +0000 -@@ -576,6 +576,86 @@ - return 0; - } - -+ -+#if defined(RTE_ARCH_X86) -+static bool -+pci_one_device_iommu_support_va(struct rte_pci_device *dev) -+{ -+#define VTD_CAP_MGAW_SHIFT 16 -+#define VTD_CAP_MGAW_MASK (0x3fULL << VTD_CAP_MGAW_SHIFT) -+#define X86_VA_WIDTH 47 /* From Documentation/x86/x86_64/mm.txt */ -+ struct rte_pci_addr *addr = &dev->addr; -+ char filename[PATH_MAX]; -+ FILE *fp; -+ uint64_t mgaw, vtd_cap_reg = 0; -+ -+ snprintf(filename, sizeof(filename), -+ "%s/" PCI_PRI_FMT "/iommu/intel-iommu/cap", -+ rte_pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid, -+ addr->function); -+ if (access(filename, F_OK) == -1) { -+ /* We don't have an Intel IOMMU, assume VA supported*/ -+ return true; -+ } -+ -+ /* We have an intel IOMMU */ -+ fp = fopen(filename, "r"); -+ if (fp == NULL) { -+ RTE_LOG(ERR, EAL, "%s(): can't open %s\n", __func__, filename); -+ return false; -+ } -+ -+ if (fscanf(fp, "%" PRIx64, &vtd_cap_reg) != 1) { -+ RTE_LOG(ERR, EAL, "%s(): can't read %s\n", __func__, filename); -+ fclose(fp); -+ return false; -+ } -+ -+ fclose(fp); -+ -+ mgaw = ((vtd_cap_reg & VTD_CAP_MGAW_MASK) >> VTD_CAP_MGAW_SHIFT) + 1; -+ if (mgaw < X86_VA_WIDTH) -+ return false; -+ -+ return true; -+} -+#elif defined(RTE_ARCH_PPC_64) -+static bool -+pci_one_device_iommu_support_va(__rte_unused struct rte_pci_device *dev) -+{ -+ return false; -+} -+#else -+static bool -+pci_one_device_iommu_support_va(__rte_unused struct rte_pci_device *dev) -+{ -+ return true; -+} -+#endif -+ -+/* -+ * * All devices IOMMUs support VA as IOVA -+ * */ -+static bool -+pci_devices_iommu_support_va(void) -+{ -+ struct rte_pci_device *dev = NULL; -+ struct rte_pci_driver *drv = NULL; -+ -+ FOREACH_DRIVER_ON_PCIBUS(drv) { -+ FOREACH_DEVICE_ON_PCIBUS(dev) { -+ if (!rte_pci_match(drv, dev)) -+ continue; -+ if (!pci_one_device_iommu_support_va(dev)) -+ return false; -+ } -+ } -+ return true; -+} -+ -+ -+ -+ - /* - * Get iommu class of PCI devices on the bus. - */ -@@ -586,12 +666,7 @@ - bool is_vfio_noiommu_enabled = true; - bool has_iova_va; - bool is_bound_uio; -- bool spapr_iommu = --#if defined(RTE_ARCH_PPC_64) -- true; --#else -- false; --#endif -+ bool iommu_no_va; - - is_bound = pci_one_device_is_bound(); - if (!is_bound) -@@ -599,13 +674,14 @@ - - has_iova_va = pci_one_device_has_iova_va(); - is_bound_uio = pci_one_device_bound_uio(); -+ iommu_no_va = !pci_devices_iommu_support_va(); - #ifdef VFIO_PRESENT - is_vfio_noiommu_enabled = rte_vfio_noiommu_is_enabled() == true ? - true : false; - #endif - - if (has_iova_va && !is_bound_uio && !is_vfio_noiommu_enabled && -- !spapr_iommu) -+ !iommu_no_va) - return RTE_IOVA_VA; - - if (has_iova_va) { -@@ -614,8 +690,8 @@ - RTE_LOG(WARNING, EAL, "vfio-noiommu mode configured\n"); - if (is_bound_uio) - RTE_LOG(WARNING, EAL, "few device bound to UIO\n"); -- if (spapr_iommu) -- RTE_LOG(WARNING, EAL, "sPAPR IOMMU does not support IOVA as VA\n"); -+ if (iommu_no_va) -+ RTE_LOG(WARNING, EAL, "IOMMU does not support IOVA as VA\n"); - } - - return RTE_IOVA_PA; - diff --git a/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch b/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch deleted file mode 100644 index 8b7ac9461..000000000 --- a/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch +++ /dev/null @@ -1,31 +0,0 @@ -From de2067b4419323eb9cefdb2faed3245b28e7d4b2 Mon Sep 17 00:00:00 2001 -From: Steven Webster -Date: Wed, 17 Oct 2018 09:50:07 -0400 -Subject: [PATCH] net-mlx5-fix-memory-region-cache-lookup - ---- - dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h b/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h -index d34f3cc..70db913 100644 ---- a/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h -+++ b/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h -@@ -548,10 +548,12 @@ struct mlx5_mr *mlx5_txq_mp2mr_reg(struct mlx5_txq_data *, struct rte_mempool *, - struct mlx5_mr *mr; - - assert(i < RTE_DIM(txq->mp2mr)); -- if (likely(txq->mp2mr[i]->start <= addr && txq->mp2mr[i]->end >= addr)) -+ if (likely(txq->mp2mr[i] != NULL && -+ txq->mp2mr[i]->start <= addr && txq->mp2mr[i]->end >= addr)) - return txq->mp2mr[i]->lkey; - for (i = 0; (i != RTE_DIM(txq->mp2mr)); ++i) { -- if (unlikely(txq->mp2mr[i]->mr == NULL)) { -+ if (unlikely(txq->mp2mr[i] == NULL || -+ txq->mp2mr[i]->mr == NULL)) { - /* Unknown MP, add a new MR for it. */ - break; - } --- -1.8.3.1 - diff --git a/networking/openvswitch/centos/patches/run-services-as-root-user.patch b/networking/openvswitch/centos/patches/run-services-as-root-user.patch index cc08d662e..a39382612 100644 --- a/networking/openvswitch/centos/patches/run-services-as-root-user.patch +++ b/networking/openvswitch/centos/patches/run-services-as-root-user.patch @@ -22,17 +22,17 @@ diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_ index c6d9aa1..63eb68e 100644 --- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in +++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in -@@ -13,10 +13,6 @@ Restart=on-failure - Environment=HOME=/var/run/openvswitch +@@ -14,10 +14,6 @@ Environment=XDG_RUNTIME_DIR=/var/run/openvswitch EnvironmentFile=/etc/openvswitch/default.conf EnvironmentFile=-/etc/sysconfig/openvswitch + EnvironmentFile=-/run/openvswitch/useropts -@begin_dpdk@ --ExecStartPre=-/usr/bin/chown :hugetlbfs /dev/hugepages +-ExecStartPre=-/bin/sh -c '/usr/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages' -ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages -@end_dpdk@ ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ --no-ovsdb-server --no-monitor --system-id=random \ - --ovs-user=${OVS_USER_ID} \ + ${OVSUSER} \ -- 1.8.3.1 diff --git a/networking/openvswitch/centos/srpm_path b/networking/openvswitch/centos/srpm_path deleted file mode 100644 index 889cf9ea1..000000000 --- a/networking/openvswitch/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:/Source/openvswitch-2.9.0-3.el7.src.rpm diff --git a/networking/openvswitch/files/configlib.sh b/networking/openvswitch/files/configlib.sh new file mode 100644 index 000000000..a1049b341 --- /dev/null +++ b/networking/openvswitch/files/configlib.sh @@ -0,0 +1,105 @@ +# Copyright (C) 2017, Red Hat, Inc. +# +# Core configuration file library. + +# Configurations are determined by sha values. The way to determine is by +# the special text: +# $FILE_COMMENT_TYPE -*- cfg-sha: $SHA256 -*- + +export LC_ALL=C + +# check required binaries +__check_reqd_binaries() { + local BIN __binaries=("egrep" "sort" "sha256sum" "sed") + for BIN in $__binaries; do + if ! type -P $BIN >/dev/null 2>&1; then + echo "Binary $BIN not found. Please install." + exit 1 + fi + done +} + +# Calculates a sha from a file +# The algorithm for generating a sha from a config is thus: +# +# 1. Remove all comment lines and blank lines +# 2. Sort the content +# 3. generate the sha-256 sum +# +# From a script perspective, this means: +# egrep -v ^\# %file% | egrep -v ^$ | sort -u | sha256sum +# +# Params: +# $1 = output variable +# $2 = file to use to calculate the shasum +# $3 = file comment type (defaults to # if unspecified) +calc_sha() { + __check_reqd_binaries + + if [ "$1" == "" ]; then + echo "Please pass in a storage variable." + return 1 + fi + + local __resultvar=$1 + __retval=1 + shift + + local __file=$1 + local cmnt=${2:-#} + + if [ -f "$__file" ]; then + local __shasum=$(egrep -v ^"$cmnt" "$__file" | egrep -v ^$ | sort -u | sha256sum -t | cut -d" " -f1) + eval $__resultvar="'$__shasum'" + __retval=0 + fi + return $__retval +} + +# Retrieves a sha stored in a file +# Param: +# $1 = output variable +# $2 = file to use to calculate the shasum +# $3 = file comment type (defaults to # if unspecified) +retr_sha() { + __check_reqd_binaries + + if [ "$1" == "" ]; then + echo "Please pass in a storage variable." + return 1 + fi + + local __resultvar=$1 + __retval=1 + shift + + local __file=$1 + local cmnt=${2:-#} + + if [ -f "$__file" ]; then + if grep -q "$cmnt -\*- cfg-sha:" "$__file"; then + local __shasum=$(grep "$cmnt -\*- cfg-sha:" "$__file" | sed -e "s@$cmnt -\*- cfg-sha: @@" | cut -d" " -f1) + eval $__resultvar="'$__shasum'" + __retval=0 + fi + fi + return $__retval +} + + +# Set a config value +# set_conf dpdk_build_tree parameter value +# dpdk_build_tree is the directory where the .config lives +# parameter is the config parameter +# value is the value to set for the config parameter +set_conf() { + c="$1/.config" + shift + + if grep -q "$1" "$c"; then + sed -i "s:^$1=.*$:$1=$2:g" $c + else + echo $1=$2 >> "$c" + fi +} + diff --git a/networking/openvswitch/files/gen_config_group.sh b/networking/openvswitch/files/gen_config_group.sh new file mode 100755 index 000000000..5ebec323b --- /dev/null +++ b/networking/openvswitch/files/gen_config_group.sh @@ -0,0 +1,144 @@ +#!/bin/bash + +source configlib.sh + +# Generates arch configurations in the current directory based on +# 1. an openvswitch.spec file +# 2. an expanded dpdk tree + +if (( $# != 2 )); then + echo "$0: openvswitch.spec dpdk_tree" >&2 + exit 1 +fi + +OVSSPEC="$1" +DPDKDIR="$2" + +# accumulate all arch + name triples +OVS_DPDK_CONF_MACH_ARCH=() +for arch in $(grep %define\ dpdk_mach_arch "$OVSSPEC" | sed 's@%define dpdk_mach_arch @@'); do + OVS_DPDK_CONF_MACH_ARCH+=($arch) +done + +OVS_DPDK_CONF_MACH_TMPL=() +for tmpl in $(grep %define\ dpdk_mach_tmpl "$OVSSPEC" | sed 's@%define dpdk_mach_tmpl @@'); do + OVS_DPDK_CONF_MACH_TMPL+=($tmpl) +done + +OVS_DPDK_CONF_MACH=() +for mach in $(grep %define\ dpdk_mach\ "$OVSSPEC" | sed 's@%define dpdk_mach @@'); do + OVS_DPDK_CONF_MACH+=($mach) +done + +OVS_DPDK_TARGETS=() +for ((i=0; i < ${#OVS_DPDK_CONF_MACH[@]}; i++)); do + OVS_DPDK_TARGETS+=("${OVS_DPDK_CONF_MACH_ARCH[$i]}-${OVS_DPDK_CONF_MACH_TMPL[$i]}-linuxapp-gcc") + echo "DPDK-target: ${OVS_DPDK_TARGETS[$i]}" +done + +OUTPUT_DIR=$(pwd) +pushd "$DPDKDIR" +for ((i=0; i < ${#OVS_DPDK_TARGETS[@]}; i++)); do + echo "For ${OVS_DPDK_TARGETS[$i]}:" + + echo " a. Generating initial config" + echo " make V=1 T=${OVS_DPDK_TARGETS[$i]} O=${OVS_DPDK_TARGETS[$i]}" + make V=1 T=${OVS_DPDK_TARGETS[$i]} O=${OVS_DPDK_TARGETS[$i]} -j8 config + ORIG_SHA="" + OUTDIR="${OVS_DPDK_TARGETS[$i]}" + + echo " b. calculating and applying sha" + calc_sha ORIG_SHA "${OUTDIR}/.config" + if [ "$ORIG_SHA" == "" ]; then + echo "ERROR: Unable to get sha for arch ${OVS_DPDK_TARGETS[$i]}" + exit 1 + fi + echo "# -*- cfg-sha: ${ORIG_SHA}" > ${OUTDIR}/.config.new + cat "${OUTDIR}/.config" >> "${OUTDIR}/.config.new" + cp "${OUTDIR}/.config" "${OUTDIR}/.config.orig" + mv -f "${OUTDIR}/.config.new" "${OUTDIR}/.config" + + echo " c. setting initial configurations" + # these are the original setconf values from openvswitch.spec + set_conf "${OUTDIR}" CONFIG_RTE_MACHINE "\\\"${OVS_DPDK_CONF_MACH[$i]}\\\"" + + # Disable DPDK libraries not needed by OVS + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_TIMER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_CFGFILE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_JOBSTATS n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_LPM n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_ACL n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_POWER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_DISTRIBUTOR n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_REORDER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PORT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_TABLE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PIPELINE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_KNI n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_CRYPTODEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_SECURITY n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_FLOW_CLASSIFY n + + # Disable virtio user as not used by OVS + set_conf "${OUTDIR}" CONFIG_RTE_VIRTIO_USER n + + # Enable DPDK libraries needed by OVS + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_VHOST_NUMA y + + # start by disabling ALL PMDs + for pmd in $(grep _PMD= "${OUTDIR}/.config" | sed 's@=\(y\|n\)@@g'); do + set_conf "${OUTDIR}" $pmd n + done + + # PMDs which have their own naming scheme + # the default for this was 'n' at one point. Make sure we keep it + # as such + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_QAT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_VHOST n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_KNI n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_XENVIRT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_NULL n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_TAP n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_PCAP n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_BOND n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_AF_PACKET n + + # whitelist of enabled PMDs + # Soft PMDs to enable + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_RING y + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_VIRTIO_PMD y + + # HW PMDs + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_I40E_PMD y + case "${OVS_DPDK_CONF_MACH_ARCH[i]}" in + x86_64) + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_ENIC_PMD y + ;& + arm64) + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_IXGBE_PMD y + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_IGB_PMD y + ;; + esac + + # Disable kernel modules + set_conf "${OUTDIR}" CONFIG_RTE_EAL_IGB_UIO n + set_conf "${OUTDIR}" CONFIG_RTE_KNI_KMOD n + + # Disable experimental stuff + set_conf "${OUTDIR}" CONFIG_RTE_NEXT_ABI n + + cp "${OUTDIR}/.config" "${OUTPUT_DIR}/${OVS_DPDK_TARGETS[$i]}-config" +done +popd >/dev/null + +echo -n "For each arch ( " +for ((i=0; i < ${#OVS_DPDK_CONF_MACH_ARCH[@]}; i++)); do + echo -n "${OVS_DPDK_CONF_MACH_ARCH[i]} " +done +echo "):" +echo "1. ensure you enable the requisite hw" diff --git a/networking/openvswitch/files/set_config.sh b/networking/openvswitch/files/set_config.sh new file mode 100755 index 000000000..002386b58 --- /dev/null +++ b/networking/openvswitch/files/set_config.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright (C) 2017, Red Hat, Inc. +# +# set_config.sh will copy a configuration from $1 to $2, in the process +# checking that the sha header for $1 matches the header in $2 + +source configlib.sh + +if (( $# < 2 )); then + echo "$0: source dest [comment-marker]" + exit 1 +fi + +if [ ! -f "$1" ]; then + echo "Source file $1 must exist." + exit 1 +fi +src_file=$1 +shift + +if [ ! -f "$1" ]; then + echo "Dest file $1 must exist." + exit 1 +fi +dst_file=$1 +shift + +comment_sep=${1:-#} + +export LANG=en_US.utf8 + +DEST_FILE_SHA="" +SRC_FILE_SHA="" + +calc_sha DEST_FILE_SHA "$dst_file" "$comment_sep" || echo "Failed to calc sha" +retr_sha SRC_FILE_SHA "$src_file" "$comment_sep" || echo "Failed to retrieve sha" + +if [ "$DEST_FILE_SHA" != "$SRC_FILE_SHA" ]; then + echo "ERROR: The requisite starting sha from $dst_file does not match the" + echo " specified sha in $src_file." + echo "[ $DEST_FILE_SHA ] vs [ $SRC_FILE_SHA ]" + exit 1 +fi + +mv "$dst_file" "$dst_file".OLD +cp "$src_file" "$dst_file" +echo "copied 1 config file." +exit 0 diff --git a/networking/openvswitch/files/x86_64-native-linuxapp-gcc-config b/networking/openvswitch/files/x86_64-native-linuxapp-gcc-config new file mode 100644 index 000000000..54f7951df --- /dev/null +++ b/networking/openvswitch/files/x86_64-native-linuxapp-gcc-config @@ -0,0 +1,546 @@ +# -*- cfg-sha: 2ba93102021dc5d38494cf5090c3ecaca37db13153dd558b1511a56f2a3d9b10 +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2017 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# RTE_EXEC_ENV values are the directories in mk/exec-env/ +CONFIG_RTE_EXEC_ENV="linuxapp" +# RTE_ARCH values are architecture we compile for. directories in mk/arch/ +CONFIG_RTE_ARCH="x86_64" +# machine can define specific variables or action for a specific board +# RTE_MACHINE values are architecture we compile for. directories in mk/machine/ +CONFIG_RTE_MACHINE="default" +# The compiler we use. +# RTE_TOOLCHAIN values are architecture we compile for. directories in mk/toolchain/ +CONFIG_RTE_TOOLCHAIN="gcc" +# Use intrinsics or assembly code for key routines +CONFIG_RTE_FORCE_INTRINSICS=n +# Machine forces strict alignment constraints. +CONFIG_RTE_ARCH_STRICT_ALIGN=n +# Compile to share library +CONFIG_RTE_BUILD_SHARED_LIB=n +# Use newest code breaking previous ABI +CONFIG_RTE_NEXT_ABI=n +# Major ABI to overwrite library specific LIBABIVER +CONFIG_RTE_MAJOR_ABI= +# Machine's cache line size +CONFIG_RTE_CACHE_LINE_SIZE=64 +# Compile Environment Abstraction Layer +CONFIG_RTE_LIBRTE_EAL=y +CONFIG_RTE_MAX_HEAPS=32 +CONFIG_RTE_MAX_LCORE=128 +CONFIG_RTE_MAX_NUMA_NODES=8 +CONFIG_RTE_MAX_MEMSEG=256 +CONFIG_RTE_MAX_MEMSEG_LISTS=128 +CONFIG_RTE_MAX_MEMSEG_PER_LIST=8192 +CONFIG_RTE_MAX_MEM_MB=524288 +CONFIG_RTE_MAX_MEMSEG_PER_TYPE=32768 +CONFIG_RTE_MAX_MEM_MB_PER_LIST=32768 +CONFIG_RTE_MAX_MEM_MB_PER_TYPE=65536 +CONFIG_RTE_MAX_MEMZONE=2560 +CONFIG_RTE_MAX_TAILQ=32 +CONFIG_RTE_ENABLE_ASSERT=n +CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_HISTORY=256 +CONFIG_RTE_BACKTRACE=y +CONFIG_RTE_LIBEAL_USE_HPET=n +CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n +CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n +CONFIG_RTE_EAL_IGB_UIO=n +CONFIG_RTE_EAL_VFIO=y +CONFIG_RTE_MAX_VFIO_GROUPS=64 +CONFIG_RTE_MAX_VFIO_CONTAINERS=64 +CONFIG_RTE_MALLOC_DEBUG=n +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y +# Recognize/ignore architecture we compile for. AVX/AVX512 CPU flags for performance/power testing. +# AVX512 is marked as experimental for now, will enable it after enough +# field test and possible optimization. +CONFIG_RTE_ENABLE_AVX=y +CONFIG_RTE_ENABLE_AVX512=n +# Default driver path (or "" to disable) +CONFIG_RTE_EAL_PMD_PATH="" +# Compile Environment Abstraction Layer to support Vmware TSC map +CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y +# Compile architecture we compile for. PCI library +CONFIG_RTE_LIBRTE_PCI=y +# Compile architecture we compile for. argument parser library +CONFIG_RTE_LIBRTE_KVARGS=y +# Compile generic ethernet library +CONFIG_RTE_LIBRTE_ETHER=y +CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n +CONFIG_RTE_EVENT_ETH_INTR_RING_SIZE=1024 +CONFIG_RTE_MAX_ETHPORTS=32 +CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 +CONFIG_RTE_LIBRTE_IEEE1588=n +CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 +CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y +CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS=n +# Turn off Tx preparation stage +# Warning: rte_eth_tx_prepare() can be safely disabled only if using a +# driver which do not implement any Tx preparation. +CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n +# Compile PCI bus driver +CONFIG_RTE_LIBRTE_PCI_BUS=y +# Compile architecture we compile for. vdev bus +CONFIG_RTE_LIBRTE_VDEV_BUS=y +# Compile burst-oriented Amazon ENA PMD driver +CONFIG_RTE_LIBRTE_ENA_PMD=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n +# Compile burst-oriented IGB & EM PMD drivers +CONFIG_RTE_LIBRTE_EM_PMD=n +CONFIG_RTE_LIBRTE_IGB_PMD=y +CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n +# Compile burst-oriented IXGBE PMD driver +CONFIG_RTE_LIBRTE_IXGBE_PMD=y +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n +CONFIG_RTE_IXGBE_INC_VECTOR=y +CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n +# Compile burst-oriented I40E PMD driver +CONFIG_RTE_LIBRTE_I40E_PMD=y +CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC=y +CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=y +CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF=64 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4 +# interval up to 8160 us, aligned to 2 (or default value) +CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1 +# Compile burst-oriented FM10K PMD +CONFIG_RTE_LIBRTE_FM10K_PMD=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y +CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y +# Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD +CONFIG_RTE_LIBRTE_MLX4_PMD=y +CONFIG_RTE_LIBRTE_MLX4_DEBUG=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n +CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 +# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD +CONFIG_RTE_LIBRTE_MLX5_PMD=y +CONFIG_RTE_LIBRTE_MLX5_DEBUG=n +CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8 +# Compile burst-oriented Broadcom PMD driver +CONFIG_RTE_LIBRTE_BNX2X_PMD=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n +CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_PERIODIC=n +# Compile burst-oriented Chelsio Terminator (CXGBE) PMD +CONFIG_RTE_LIBRTE_CXGBE_PMD=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_REG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_CXGBE_TPUT=y +# Compile burst-oriented Cisco ENIC PMD driver +CONFIG_RTE_LIBRTE_ENIC_PMD=y +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n +# Compile burst-oriented Netronome NFP PMD driver +CONFIG_RTE_LIBRTE_NFP_PMD=n +CONFIG_RTE_LIBRTE_NFP_DEBUG=n +# Compile Marvell PMD driver +CONFIG_RTE_LIBRTE_MRVL_PMD=n +# Compile burst-oriented Broadcom BNXT PMD driver +CONFIG_RTE_LIBRTE_BNXT_PMD=n +# Compile burst-oriented Solarflare libefx-based PMD +CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n +CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n +# Compile SOFTNIC PMD +CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y +# Compile software PMD backed by SZEDATA2 device +CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n +# Defines firmware type address space. +# See documentation for supported values. +# Other values raise compile time error. +CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 +# Compile burst-oriented Cavium Thunderx NICVF PMD driver +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n +# Compile burst-oriented Cavium LiquidIO PMD driver +CONFIG_RTE_LIBRTE_LIO_PMD=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_REGS=n +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=n +CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA_PMD=n +# Compile burst-oriented Cavium OCTEONTX network PMD driver +CONFIG_RTE_LIBRTE_OCTEONTX_PMD=y +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX=n +# Compile NXP DPAA2 FSL-MC Bus +CONFIG_RTE_LIBRTE_FSLMC_BUS=n +# Compile Support Libraries for NXP DPAA2 +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y +# Compile burst-oriented NXP DPAA2 PMD driver +CONFIG_RTE_LIBRTE_DPAA2_PMD=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n +# Compile burst-oriented VIRTIO PMD driver +CONFIG_RTE_LIBRTE_VIRTIO_PMD=y +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n +# Compile virtio device emulation inside virtio PMD driver +CONFIG_RTE_VIRTIO_USER=n +# Compile burst-oriented VMXNET3 PMD driver +CONFIG_RTE_LIBRTE_VMXNET3_PMD=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n +# Compile example software rings based PMD +CONFIG_RTE_LIBRTE_PMD_RING=y +CONFIG_RTE_PMD_RING_MAX_RX_RINGS=16 +CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 +# Compile software PMD backed by PCAP files +CONFIG_RTE_LIBRTE_PMD_PCAP=n +# Compile link bonding PMD library +CONFIG_RTE_LIBRTE_PMD_BOND=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n +# QLogic 10G/25G/40G/50G/100G PMD +CONFIG_RTE_LIBRTE_QEDE_PMD=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y +#Provides abs path/name of architecture we compile for. firmware file. +#Empty string denotes driver will use default firmware +CONFIG_RTE_LIBRTE_QEDE_FW="" +# Compile software PMD backed by AF_PACKET sockets (Linux only) +CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n +# Compile ARK PMD +CONFIG_RTE_LIBRTE_ARK_PMD=n +CONFIG_RTE_LIBRTE_ARK_PAD_TX=y +CONFIG_RTE_LIBRTE_ARK_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n +# Compile WRS accelerated virtual port (AVP) guest PMD driver +CONFIG_RTE_LIBRTE_AVP_PMD=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y +CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n +# Compile architecture we compile for. TAP PMD +# It is enabled by default for Linux only. +CONFIG_RTE_LIBRTE_PMD_TAP=n +# Compile null PMD +CONFIG_RTE_LIBRTE_PMD_NULL=n +# Compile fail-safe PMD +CONFIG_RTE_LIBRTE_PMD_FAILSAFE=y +# Do prefetch of packet data within PMD driver receive function +CONFIG_RTE_PMD_PACKET_PREFETCH=y +# Compile generic crypto device library +CONFIG_RTE_LIBRTE_CRYPTODEV=y +CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n +CONFIG_RTE_CRYPTO_MAX_DEVS=64 +CONFIG_RTE_CRYPTODEV_NAME_LEN=64 +CONFIG_RTE_EVENT_CRYPTO_ADAPTER_MAX_INSTANCE=32 +# Compile PMD for ARMv8 Crypto device +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n +# Compile NXP DPAA2 crypto sec driver for CAAM HW +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n +# NXP DPAA caam - crypto driver +CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n +# Compile PMD for QuickAssist based devices +CONFIG_RTE_LIBRTE_PMD_QAT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n +# Number of sessions to create in architecture we compile for. session memory pool +# on a single QuickAssist device. +CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048 +# Compile PMD for AESNI backed device +CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n +CONFIG_RTE_LIBRTE_PMD_AESNI_MB_DEBUG=n +# Compile PMD for Software backed device +CONFIG_RTE_LIBRTE_PMD_OPENSSL=n +CONFIG_RTE_LIBRTE_PMD_OPENSSL_DEBUG=n +# Compile PMD for AESNI GCM device +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n +# Compile PMD for SNOW 3G device +CONFIG_RTE_LIBRTE_PMD_SNOW3G=n +CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n +# Compile PMD for KASUMI device +CONFIG_RTE_LIBRTE_PMD_KASUMI=n +CONFIG_RTE_LIBRTE_PMD_KASUMI_DEBUG=n +# Compile PMD for ZUC device +CONFIG_RTE_LIBRTE_PMD_ZUC=n +CONFIG_RTE_LIBRTE_PMD_ZUC_DEBUG=n +# Compile PMD for Crypto Scheduler device +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=n +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER_DEBUG=n +# Compile PMD for NULL Crypto device +CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=n +# Compile PMD for Marvell Crypto device +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG=n +# Compile generic security library +CONFIG_RTE_LIBRTE_SECURITY=n +# Compile generic event device library +CONFIG_RTE_LIBRTE_EVENTDEV=y +CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n +CONFIG_RTE_EVENT_MAX_DEVS=16 +CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64 +CONFIG_RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE=32 +# Compile PMD for skeleton event device +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG=n +# Compile PMD for software event device +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n +# Compile PMD for octeontx sso event device +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n +# Compile librte_ring +CONFIG_RTE_LIBRTE_RING=y +# Compile librte_mempool +CONFIG_RTE_LIBRTE_MEMPOOL=y +CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE=512 +CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=n +# Compile Mempool drivers +CONFIG_RTE_DRIVER_MEMPOOL_RING=y +CONFIG_RTE_DRIVER_MEMPOOL_STACK=y +# Compile PMD for octeontx fpa mempool device +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=y +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG=n +# Compile librte_mbuf +CONFIG_RTE_LIBRTE_MBUF=y +CONFIG_RTE_LIBRTE_MBUF_DEBUG=n +CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" +CONFIG_RTE_MBUF_REFCNT_ATOMIC=y +CONFIG_RTE_PKTMBUF_HEADROOM=128 +# Compile librte_timer +CONFIG_RTE_LIBRTE_TIMER=y +CONFIG_RTE_LIBRTE_TIMER_DEBUG=n +CONFIG_RTE_EVENT_TIMER_ADAPTER_NUM_MAX=32 +# Compile librte_cfgfile +CONFIG_RTE_LIBRTE_CFGFILE=n +# Compile librte_cmdline +CONFIG_RTE_LIBRTE_CMDLINE=y +CONFIG_RTE_LIBRTE_CMDLINE_DEBUG=n +# Compile librte_hash +CONFIG_RTE_LIBRTE_HASH=y +CONFIG_RTE_LIBRTE_HASH_DEBUG=n +# Compile librte_efd +CONFIG_RTE_LIBRTE_EFD=y +# Compile librte_member +CONFIG_RTE_LIBRTE_MEMBER=y +# Compile librte_jobstats +CONFIG_RTE_LIBRTE_JOBSTATS=n +# Compile architecture we compile for. device metrics library +CONFIG_RTE_LIBRTE_METRICS=y +# Compile architecture we compile for. bitrate statistics library +CONFIG_RTE_LIBRTE_BITRATE=y +# Compile architecture we compile for. latency statistics library +CONFIG_RTE_LIBRTE_LATENCY_STATS=y +# Compile librte_lpm +CONFIG_RTE_LIBRTE_LPM=y +CONFIG_RTE_LIBRTE_LPM_DEBUG=n +# Compile librte_acl +CONFIG_RTE_LIBRTE_ACL=y +CONFIG_RTE_LIBRTE_ACL_DEBUG=n +# Compile librte_power +CONFIG_RTE_LIBRTE_POWER=n +CONFIG_RTE_LIBRTE_POWER_DEBUG=n +CONFIG_RTE_MAX_LCORE_FREQS=64 +# Compile librte_net +CONFIG_RTE_LIBRTE_NET=y +# Compile librte_ip_frag +CONFIG_RTE_LIBRTE_IP_FRAG=y +CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n +CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n +# Compile GRO library +CONFIG_RTE_LIBRTE_GRO=y +# Compile GSO library +CONFIG_RTE_LIBRTE_GSO=y +# Compile librte_meter +CONFIG_RTE_LIBRTE_METER=y +# Compile librte_classify +CONFIG_RTE_LIBRTE_FLOW_CLASSIFY=n +# Compile librte_sched +CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n +CONFIG_RTE_SCHED_RED=n +CONFIG_RTE_SCHED_COLLECT_STATS=n +CONFIG_RTE_SCHED_SUBPORT_TC_OV=n +CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 +CONFIG_RTE_SCHED_VECTOR=n +# Compile architecture we compile for. distributor library +CONFIG_RTE_LIBRTE_DISTRIBUTOR=n +# Compile architecture we compile for. reorder library +CONFIG_RTE_LIBRTE_REORDER=n +# Compile librte_port +CONFIG_RTE_LIBRTE_PORT=y +CONFIG_RTE_PORT_STATS_COLLECT=n +CONFIG_RTE_PORT_PCAP=n +# Compile librte_table +CONFIG_RTE_LIBRTE_TABLE=y +CONFIG_RTE_TABLE_STATS_COLLECT=n +# Compile librte_pipeline +CONFIG_RTE_LIBRTE_PIPELINE=y +CONFIG_RTE_PIPELINE_STATS_COLLECT=n +# Compile librte_kni +CONFIG_RTE_LIBRTE_KNI=n +CONFIG_RTE_LIBRTE_PMD_KNI=n +CONFIG_RTE_KNI_KMOD=n +CONFIG_RTE_KNI_KMOD_ETHTOOL=n +CONFIG_RTE_KNI_PREEMPT_DEFAULT=y +# Compile architecture we compile for. pdump library +CONFIG_RTE_LIBRTE_PDUMP=y +# Compile vhost user library +CONFIG_RTE_LIBRTE_VHOST=y +CONFIG_RTE_LIBRTE_VHOST_NUMA=y +CONFIG_RTE_LIBRTE_VHOST_DEBUG=n +# Compile vhost PMD +# To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled. +CONFIG_RTE_LIBRTE_PMD_VHOST=n +# Compile architecture we compile for. test application +CONFIG_RTE_APP_TEST=y +CONFIG_RTE_APP_TEST_RESOURCE_TAR=n +# Compile architecture we compile for. PMD test application +CONFIG_RTE_TEST_PMD=n +CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n +CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n +# Compile architecture we compile for. crypto performance application +CONFIG_RTE_APP_CRYPTO_PERF=y +# Compile architecture we compile for. eventdev application +CONFIG_RTE_APP_EVENTDEV=y +CONFIG_RTE_EXEC_ENV_LINUXAPP=y +CONFIG_RTE_ARCH_X86_64=y +CONFIG_RTE_ARCH_X86=y +CONFIG_RTE_ARCH_64=y +CONFIG_RTE_TOOLCHAIN_GCC=y +CONFIG_RTE_LIBRTE_PMD_XENVIRT=n