From 6ed4cea857458fb5b838950c14aa5580355275ce189aea4c6fdc5cab12224413 Mon Sep 17 00:00:00 2001 From: Nirmoy Das Date: Mon, 2 Jan 2017 15:27:54 +0000 Subject: [PATCH 1/6] Accepting request 448521 from home:mvarlese:branches:network - Added dependency on gcc6 to build for aarch64 (armv8a) successfully - Added support to build code for Thunderx platform: * New patch (0001-rte-vars-fix-for-thunderx.patch) to fix DPDK cross-compile environment - Introduced new dpdk-thunderx.spec file: * Removed architectures not supporting Thunderx platform (e.g. x86) * Added dependency on gcc v5.0 for armv8a-crc - Update to version 16.07.2. Some of the fixes are listed below: * ethdev: prevent duplicate event callback * hash: fix bucket size usage OBS-URL: https://build.opensuse.org/request/show/448521 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=21 --- 0001-rte-vars-fix-for-thunderx.patch | 11 + dpdk-thunderx.changes | 320 +++++++++++++++++++++++++++ dpdk-thunderx.spec | 309 ++++++++++++++++++++++++++ dpdk.changes | 25 +++ dpdk.spec | 12 +- 5 files changed, 672 insertions(+), 5 deletions(-) create mode 100644 0001-rte-vars-fix-for-thunderx.patch create mode 100644 dpdk-thunderx.changes create mode 100644 dpdk-thunderx.spec diff --git a/0001-rte-vars-fix-for-thunderx.patch b/0001-rte-vars-fix-for-thunderx.patch new file mode 100644 index 0000000..6519d8c --- /dev/null +++ b/0001-rte-vars-fix-for-thunderx.patch @@ -0,0 +1,11 @@ +--- mk/machine/thunderx/rte.vars.mk 2016-12-07 13:49:18.397009133 +0100 ++++ mk/machine/thunderx/rte.vars.mk 2016-12-07 13:49:37.537806161 +0100 +@@ -47,7 +47,7 @@ + # + + # ARCH = +-CROSS ?= aarch64-thunderx-linux-gnu- ++# CROSS ?= aarch64-thunderx-linux-gnu- + # MACHINE_CFLAGS = + # MACHINE_LDFLAGS = + # MACHINE_ASFLAGS = diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes new file mode 100644 index 0000000..892dd03 --- /dev/null +++ b/dpdk-thunderx.changes @@ -0,0 +1,320 @@ +------------------------------------------------------------------- +Tue Dec 13 13:29:03 UTC 2016 - marco.varlese@suse.com + +- Added dependency on gcc6 to build for aarch64 (armv8a) successfully + +------------------------------------------------------------------- +Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com + +- Fixed paths using %{name} to have the dpdk.spec aligned with dpdk-thunderx.spec + +------------------------------------------------------------------- +Mon Dec 12 11:08:37 UTC 2016 - marco.varlese@suse.com + +- Added back in all the architectures to keep .spec files aligned + * Driving thunderx platform architectural dependency via the ExclusiveArch tag + +------------------------------------------------------------------- +Mon Dec 12 10:30:00 UTC 2016 - mvarlese@suse.com + +- Added support to build code for Thunderx platform: + * New patch (0001-rte-vars-fix-for-thunderx.patch) to fix DPDK cross-compile environment +- Introduced new dpdk-thunderx.spec file: + * Removed architectures not supporting Thunderx platform (e.g. x86) + * Added dependency on gcc v5.0 for armv8a-crc + +------------------------------------------------------------------- +Wed Nov 30 16:51:47 UTC 2016 - mchandras@suse.de + +- Update to version 16.07.2. Some of the fixes are listed below: + * ethdev: prevent duplicate event callback + * hash: fix bucket size usage + * hash: fix unlimited cuckoo path + * lpm: fix freeing memory + * lpm: fix freeing unused sub-table on rule delete + * mempool: fix leak if populate fails + * mempool: fix search of maximum contiguous pages + * pci: fix probing error if no driver found + * net/bnx2x: fix maximum PF queues + * net/bnxt: fix bit shift size + * net/bnxt: fix crash when closing + * net/enic: fix Rx queue index when not using Rx scatter + * net/enic: fix crash on MTU update or Rx queue reconfigure + * net/enic: fix crash with removed flow director filters + * net/enic: fix max packet length check + * net/enic: fix multi-queue Rx performance + * net/enic: revert truncated packets counter fix + * net/fm10k: fix VF Tx queue initialization + * net/i40e: fix Rx hang when disable LLDP + * net/ixgbe: fix VF registers + * net/thunderx: fix Tx checksum handling + * [The list of changes is rather long so please consult the following + resources for the complete list of new features, bugfixes and other + changes in this release: + - http://dpdk.org/doc/guides-16.07/rel_notes/release_16_07.html#id2] + +------------------------------------------------------------------- +Thu Nov 24 15:31:27 UTC 2016 - mchandras@suse.de + +- Update to version 16.07.1. Some of the fixes are listed below: + * contigmem: zero all pages during mmap + * crypto/null: fix key size increment value + * hash: fix false zero signature key hit lookup + * mem: fix crash on hugepage mapping error + * mbuf: fix error handling on pool creation + * net/e1000: fix returned number of available Rx descriptors + * net/enic: fix freeing memory for descriptor ring + * net/i40e: fix dropping packets with ethertype 0x88A8 + * net/i40e: fix mbuf leak during Rx queue release + * net/i40e: fix null pointer dereferences when using VMDq+RSS + * net/ixgbe/base: fix possible corruption of shadow RAM + * net/ixgbe: fix VF reset to apply to correct VF + * net/virtio_user: fix error management during init + * [The list of changes is rather long so please consult the following + resources for the complete list of new features, bugfixes and other + changes in this release: + - http://dpdk.org/doc/guides-16.07/rel_notes/release_16_07.html#fixes-in-16-07-01-stable-release] + +------------------------------------------------------------------- +Thu Oct 6 10:36:52 UTC 2016 - mchandras@suse.de + +- Drop code for generating our own linker script. + * Commit 948fd64befc3 (" mk: replace the combined library with a + linker script") added upstream support for building and installing + a linker script so we drop our code from the spec file which + generated a much larger and possibly broken linker script resulting + to linking issues (boo#1002534) + +------------------------------------------------------------------- +Wed Aug 10 16:51:17 CEST 2016 - ndas@suse.de + +- Update to version 16.07. Some of the new features are listed below: + * Removed the mempool cache memory if caching is not being used. + * Added mempool external cache for non-EAL thread. + * Changed the memory allocation scheme in the mempool library. + * Added a new driver for Broadcom NetXtreme-C devices. + * Added a new driver for ThunderX nicvf devices. + * Added mailbox interrupt support for ixgbe and igb VFs. + * Updated the ixgbe base driver. + * Updated the i40e base driver. + * Updated the enic driver. + * Updated the mlx5 driver. + * Added support for virtio on IBM POWER8. + * Added support for Virtio in containers. + * Added vhost-user client mode. + * Added NSH packet recognition in i40e. + * Added AES-CTR support to AESNI MB PMD. + * Added AES counter mode support for Intel QuickAssist devices. + * Added KASUMI SW PMD. + * Added multi-writer support for RTE Hash with Intel TSX. + * Improved IP Pipeline Application. + * Added keepalive enhancements. + * Added packet capture framework. + * Added floating VEB support for i40e PF driver. + * Added support for live migration of a VM with SRIOV VF. + * [The list of changes is rather long so please consult the following + resources for the complete list of new features, bugfixes and other + changes in this release: + - http://dpdk.org/doc/guides/rel_notes/release_16_07.html + - http://dpdk.org/browse/dpdk/tree/doc/guides/rel_notes/release_16_07.rst + - Or the doc/guides/rel_notes/release_16_07.rst file in the released + tarball.] +- Removed patches that are already avilable in dpdk-16.07 + [ -0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch + -0003-mk-fix-external-shared-library-dependencies-of-libraries.patch + -0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch + -0005-d293dac-vhost-claim-support-of-guest-announce.patch + -0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch + -0007-ixgbe-fix-VLAN-filter-missing-brackets.patch + -0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch + -0009-bonding-copy-entire-config-structure-in-mode-4.patch + -0010-bonding-fix-active-slaves-with-no-primary.patch + -0011-bonding-do-not-ignore-multicast-in-mode-4.patch + -0012-bonding-do-not-activate-slave-twice.patch + -0013-bonding-fix-crash-when-no-slave-device.patch + -0014-bonding-fix-detach-of-bonded-device.patch + -0015-bonding-fix-detach-of-slave-devices.patch + -0016-eal-linux-support-built-in-kernel-modules.patch + -0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch + -0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch + -0019-i40e-base-fix-driver-load-failure.patch + -0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch + -0021-i40e-fix-inverted-check-for-no-refcount.patch + -0022-i40e-fix-overflow.patch + -0023-i40e-fix-VLAN-filtering.patch + -0024-mempool-fix-leak-when-creation-fails.patch + -0025-pcap-fix-captured-frame-length.patch + -0026-port-fix-crash-for-ethdev-writer-nodrop.patch + -0027-port-fix-crash-for-ring-writer-nodrop.patch + -0028-tools-fix-unbinding-failure-handling.patch + -0029-tools-support-Python-3-in-bind-script.patch + -0030-tools-support-binding-to-built-in-kernel-modules.patch + -0031-vhost-fix-leak-of-fds-and-mmaps.patch + -0032-virtio-fix-crash-in-statistics-functions.patch + -0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch + -0034-virtio-fix-restart.patch + -0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch + -0036-examples-fix-build-dependencies.patch + -0037-examples-ethtool-fix-build.patch + -0099-mk-fix-gcc-5-version-on-suse.patch + -0100-kni-fix-build-with-gcc-6.patch + -0101-ixgbe-fix-uninitialized-warning.patch + -0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch + -0103-e1000-base-Add-missing-braces-to-the-if-statements.patch + -0104-igb-fix-constant-sign-in-left-shift-operator.patch + -0105-e1000-fix-missing-link-interrupt-check-brackets.patch + -0106-app-test-fix-missing-brackets.patch + -0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch + ] + +- Created soft link for dpdk_proc_info and dpdk_nic_bind(from dpdk-procinfo, dpdk-devbind) to keep compatibility. +- Added a new binary dpdk-pdump dpdk-procinfo + +------------------------------------------------------------------- +Thu Jul 28 16:39:07 CEST 2016 - ndas@suse.de + +- Add _constraints file to force build dpdk with sse3 enabled x86 machine. +- Enable compilation for ppc64le with the help of RĂ¼diger(ro@suse.de). +- Enable example package for aarch64 using RĂ¼diger(ro@suse.de) changes. +- Do not enable PMD_RING on ppc64le (missing rte_eth_from_rings). +- Disable examples that need LPM which is disabled on non-x86. + + [+0036-examples-fix-build-dependencies.patch, + +0037-examples-ethtool-fix-build.patch] + +------------------------------------------------------------------- +Mon Jul 11 18:20:57 CEST 2016 - ndas@suse.de + +- Added support for aarch64 compilation. + [+0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch] +- Disabled aarch64 dpdk-examples package for the time being as it + contains lots of Intel specific code. +- Added proper "Group" field for the subpackages . + +------------------------------------------------------------------- +Thu Jun 23 09:56:05 UTC 2016 - mchandras@suse.de + +- Add upstream patches to fix building with gcc >= 6 + * 0100-kni-fix-build-with-gcc-6.patch + * 0101-ixgbe-fix-uninitialized-warning.patch + * 0102-ixgbe-fix-constant-sign-in-left-shift-operator.patch + * 0103-e1000-base-Add-missing-braces-to-the-if-statements.patch + * 0104-igb-fix-constant-sign-in-left-shift-operator.patch + * 0105-e1000-fix-missing-link-interrupt-check-brackets.patch + * 0106-app-test-fix-missing-brackets.patch + * 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch + +------------------------------------------------------------------- +Tue Jun 14 10:04:09 UTC 2016 - ndas@suse.de + +- Removed unwanted files(bsc#984437). + +------------------------------------------------------------------- +Thu Jun 9 17:18:01 CEST 2016 - ndas@suse.de + +- Added missing GPL-2.0 and LGPL-2.1 licenses. + +------------------------------------------------------------------- +Wed Jun 1 14:16:10 UTC 2016 - mchandras@suse.de + +- Update tarball URL. + +------------------------------------------------------------------- +Fri May 27 12:28:02 CEST 2016 - ndas@suse.de + +- Applied all the fixes recommended by upstream for + v2.2 stable release(bsc#981996). + + [+0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch, + +0009-bonding-copy-entire-config-structure-in-mode-4.patch, + +0010-bonding-fix-active-slaves-with-no-primary.patch, + +0011-bonding-do-not-ignore-multicast-in-mode-4.patch, + +0012-bonding-do-not-activate-slave-twice.patch, + +0013-bonding-fix-crash-when-no-slave-device.patch, + +0014-bonding-fix-detach-of-bonded-device.patch, + +0015-bonding-fix-detach-of-slave-devices.patch, + +0016-eal-linux-support-built-in-kernel-modules.patch, + +0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch, + +0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch, + +0019-i40e-base-fix-driver-load-failure.patch, + +0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch, + +0021-i40e-fix-inverted-check-for-no-refcount.patch, + +0022-i40e-fix-overflow.patch, + +0023-i40e-fix-VLAN-filtering.patch, + +0024-mempool-fix-leak-when-creation-fails.patch, + +0025-pcap-fix-captured-frame-length.patch, + +0026-port-fix-crash-for-ethdev-writer-nodrop.patch, + +0027-port-fix-crash-for-ring-writer-nodrop.patch, + +0028-tools-fix-unbinding-failure-handling.patch, + +0029-tools-support-Python-3-in-bind-script.patch, + +0030-tools-support-binding-to-built-in-kernel-modules.patch, + +0031-vhost-fix-leak-of-fds-and-mmaps.patch, + +0032-virtio-fix-crash-in-statistics-functions.patch, + +0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch, + +0034-virtio-fix-restart.patch] + +------------------------------------------------------------------- +Wed May 11 09:21:40 UTC 2016 - mchandras@suse.de + +- Use fdupes to manage duplicate files + +------------------------------------------------------------------- +Thu Apr 28 14:39:36 CEST 2016 - ndas@suse.de + +- Create DPDK packages for 32 bit x86(bsc#977639). + +------------------------------------------------------------------- +Wed Apr 27 14:55:37 UTC 2016 - mchandras@suse.de + +- Add upstream patch for the ixgbe driver + * 0007-ixgbe-fix-VLAN-filter-missing-brackets.patch: Fix VLAN + filtering logic by adding the missing brackets in the 'if' statement. + +------------------------------------------------------------------- +Tue Apr 19 10:45:29 CEST 2016 - ndas@suse.de + +- DPDK is most common vhost-user backend, Adding upstream patches to + help qemu vm live migration with vhost-user (fate#320713). + [+ 0004-54f9e32-vhost-handle-dirty-pages-logging-request.patch + + 0005-d293dac-vhost-claim-support-of-guest-announce.patch + + 0006-d639996-vhost-enable-log_shmfd-protocol-feature.patch] + +------------------------------------------------------------------- +Wed Apr 13 10:56:08 UTC 2016 - mchandras@suse.de + +- Move the combined library back to the devel package (bsc#975123) + Ever since we dropped the CONFIG_RTE_BUILD_COMBINE_LIBS=y option, the + libdpdk.so is no longer a shared object but rather a linker script + generated by the spec file. This means that it is only used during + linking and the linker will add the individual DPDK libraries to the + DT_NEEDED tag on the dependent binaries. + +------------------------------------------------------------------- +Tue Apr 12 12:45:40 UTC 2016 - mchandras@suse.de + +- Fix shared linking against libdpdk.so (bsc#975123) + * Restore the 0003-mk-fix-external-shared-library-dependencies-of-libraries.patch + patch which sets the correct dependencies for the shared libraries. + * Drop CONFIG_RTE_BUILD_COMBINE_LIBS since a custom linker script + is used to create and install a more lightweight version of libdpdk.so. + * Include the combined libdpdk.so library to the regular package since it + is also necessary during runtime. + +------------------------------------------------------------------- +Mon Apr 11 16:12:09 CEST 2016 - ndas@suse.de + +- Removed unwnated patch and reformated patch file names(bsc#974903). + [- dpdk-2.2-dtneeded.patch, + - dpdk-2.2-examples.patch, + - enic-pun-fix.patch, + - dpdk-2.2-warningflags.patch, + + 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch + + 0002-examples-ip_pipeline-fix-implicit-declaration-of-fun.patch] +- Added CONFIG_RTE_BUILD_COMBINE_LIBS flags to club all all *.so into + one library + +------------------------------------------------------------------- +Mon Mar 21 14:15:08 UTC 2016 - nirmoy.das@suse.com + +- Intial version 2.2.0(fate#319169) + diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec new file mode 100644 index 0000000..5ae8ae0 --- /dev/null +++ b/dpdk-thunderx.spec @@ -0,0 +1,309 @@ +# +# spec file for package dpdk-thunderx +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define machine native +%define machine2 default +%ifarch x86_64 +%define machine native +%define target x86_64-%{machine}-linuxapp-gcc +%endif +%ifarch %ix86 +%define machine native +%define target i686-%{machine}-linuxapp-gcc +%endif +%ifarch aarch64 +%define machine2 thunderx +%define target arm64-%{machine2}-linuxapp-gcc +%endif +%ifarch ppc64le +%define machine2 power8 +%define target ppc_64-%{machine2}-linuxapp-gcc +%endif + +%bcond_without shared +# Add option to build without examples +%bcond_without examples +# Add option to build without tools +%bcond_without tools + +Name: dpdk-thunderx +Version: 16.07.2 +Release: 0 +Summary: Set of libraries and drivers for fast packet processing +License: BSD-3-Clause and GPL-2.0 and LGPL-2.1 +Group: System/Libraries +Url: http://dpdk.org +Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz +# PATCH-FIX-OPENSUSE 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch +# This patch was originally taken from the fedora package but they have +# removed it since then because of +# http://osdir.com/ml/scm-fedora-commits/2016-03/msg00849.html +# However, the problem still exists and the fix has to find its way to the +# upstream code. +Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch +# PATCH-FIX-OPENSUSE 0001-rte-vars-fix-for-thunderx.patch +# This patch comments the CROSS compilation (broken) in the mk file for ThunderX +# Upstreaming of this patch will have to be pursued. +Patch2: 0001-rte-vars-fix-for-thunderx.patch +BuildRequires: doxygen +BuildRequires: fdupes +# Required to build on aarch64 (gcc option armv8-a+crc) +BuildRequires: gcc6 +BuildRequires: libnuma-devel +BuildRequires: libpcap-devel +BuildRequires: zlib-devel +ExclusiveArch: aarch64 x86_64 %ix86 ppc64le +Conflicts: dpdk + +%description +The Data Plane Development Kit is a set of libraries and drivers for +fast packet processing in the user space. + +%package devel +Summary: Data Plane Development Kit development files +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} + +%description devel +This package contains the headers and other files needed for developing +applications with the Data Plane Development Kit. + +%package doc +Summary: Data Plane Development Kit API documentation +Group: System/Libraries +BuildArch: noarch + +%description doc +API programming documentation for the Data Plane Development Kit. + +%if %{with tools} +%package tools +Summary: Tools for setting up Data Plane Development Kit environment +Group: System/Libraries +Requires: %{name} = %{version} +Requires: findutils +Requires: iproute +Requires: kmod +Requires: pciutils + +%description tools +This package contains tools for setting up Data Plane Development Kit environment +%endif + +%if %{with examples} +%package examples +Summary: Data Plane Development Kit example applications +Group: System/Libraries +BuildRequires: libvirt-devel + +%description examples +Example applications utilizing the Data Plane Development Kit, such +as L2 and L3 forwarding. +%endif + +%define sdkdir %{_datadir}/dpdk +%define docdir %{_docdir}/dpdk +%define incdir %{_includedir}/dpdk +%define pmddir %{_libdir}/dpdk-pmds + +%prep +%setup -q -n dpdk-stable-%{version} +%patch1 -p1 -z .enic +%patch2 -p0 -z .rte + +%build +# set up a method for modifying the resulting .config file +function setconf() { + if grep -q ^$1= %{target}/.config; then + sed -i "s:^$1=.*$:$1=$2:g" %{target}/.config + else + echo $1=$2 >> %{target}/.config + fi +} + +# In case dpdk-devel is installed, we should ignore its hints about the SDK directories +unset RTE_SDK RTE_INCLUDE RTE_TARGET + +# For the release, '-Wno-error=array-bounds' is done to prevent a spurious error +# generated by gcc 5.X against the 2.1 branch +export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds" + +# 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=%{target} T=%{target} %{?_smp_mflags} config + +setconf CONFIG_RTE_MACHINE '"%{machine2}"' +# Disable experimental features +setconf CONFIG_RTE_NEXT_ABI n +setconf CONFIG_RTE_LIBRTE_CRYPTODEV n +setconf CONFIG_RTE_LIBRTE_MBUF_OFFLOAD n + +# Enable automatic driver loading from this path +setconf CONFIG_RTE_EAL_PMD_PATH '"%{pmddir}"' + +setconf CONFIG_RTE_LIBRTE_BNX2X_PMD y +setconf CONFIG_RTE_LIBRTE_PMD_PCAP y +setconf CONFIG_RTE_LIBRTE_VHOST_NUMA y + +setconf CONFIG_RTE_EAL_IGB_UIO n +setconf CONFIG_RTE_LIBRTE_KNI n +setconf CONFIG_RTE_KNI_KMOD n +setconf CONFIG_RTE_KNI_PREEMPT_DEFAULT n + +%if %{with shared} +setconf CONFIG_RTE_BUILD_SHARED_LIB y +%endif + +%ifarch aarch64 ppc64le +setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n +%endif +%ifarch ppc64le +setconf CONFIG_RTE_LIBRTE_PMD_RING n +%endif + +make V=1 O=%{target} %{?_smp_mflags} +make V=1 O=%{target} %{?_smp_mflags} doc-api-html + +%if %{with examples} +make V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples +%endif + +%install +# In case dpdk-devel is installed +unset RTE_SDK RTE_INCLUDE RTE_TARGET + +%make_install O=%{target} prefix=%{_usr} libdir=%{_libdir} + +%if ! %{with tools} +rm -rf %{buildroot}%{sdkdir}/tools +rm -rf %{buildroot}%{_sbindir}/dpdk_nic_bind +%endif +rm -f %{buildroot}%{sdkdir}/tools/setup.sh +#TODO pip elftools has issues to fix +rm -rf %{buildroot}%{_bindir}/dpdk-pmdinfo + +%if %{with examples} +find %{target}/examples/ -name "*.map" | xargs rm -f +for f in %{target}/examples/*/%{target}/app/*; do + bn=`basename ${f}` + cp -p ${f} %{buildroot}%{_bindir}/dpdk_example_${bn} +done +%endif + +# Create a driver directory with symlinks to all pmds +mkdir -p %{buildroot}/%{pmddir} +for f in %{buildroot}/%{_libdir}/*_pmd_*.so; do + bn=$(basename ${f}) + ln -s ../${bn} %{buildroot}%{pmddir}/${bn} +done + +# Setup RTE_SDK environment as expected by apps etc +mkdir -p %{buildroot}/%{_sysconfdir}/profile.d +cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.sh +if [ -z "\${RTE_SDK}" ]; then + export RTE_SDK="%{sdkdir}" + export RTE_TARGET="%{target}" + export RTE_INCLUDE="%{incdir}" +fi +EOF + +cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.csh +if ( ! \$RTE_SDK ) then + setenv RTE_SDK "%{sdkdir}" + setenv RTE_TARGET "%{target}" + setenv RTE_INCLUDE "%{incdir}" +endif +EOF + +# Fixup target machine mismatch +sed -i -e 's:-%{machine}-:-%{machine2}-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk* + +#doc +mkdir %{buildroot}%{_docdir}/ +mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%{_docdir}/ + +ln -s %{_bindir}/dpdk-procinfo %{buildroot}%{_bindir}/dpdk_proc_info +ln -s %{_sbindir}/dpdk-devbind %{buildroot}%{_sbindir}/dpdk_nic_bind + +# Remove duplicates +%fdupes %{buildroot}/%{_prefix} + +%post devel -p /sbin/ldconfig +%postun devel -p /sbin/ldconfig +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +# BSD +%{_bindir}/testpmd +%{_bindir}/dpdk-procinfo +%{_bindir}/dpdk_proc_info +%{_bindir}/dpdk-pdump + +%if %{with shared} +%dir %{_libdir}/dpdk-pmds + +%{_libdir}/*.so.* +%{pmddir}/ +%endif + +%files doc +%defattr(-,root,root) +#BSD +%docdir +%doc LICENSE.GPL LICENSE.LGPL + +%files devel +%defattr(-,root,root) +#BSD +%{incdir}/ +%{sdkdir} +%if %{with tools} +%exclude %{sdkdir}/tools/ +%endif +%if %{with examples} +%exclude %{sdkdir}/examples/ +%endif +%{_sysconfdir}/profile.d/dpdk-sdk-*.* +%if ! %{with shared} +%{_libdir}/*.a +%else +%{_libdir}/*.so +%endif + +%if %{with tools} +%files tools +%defattr(-,root,root) +%{sdkdir}/tools/ +%{_sbindir}/dpdk-devbind +%{_sbindir}/dpdk_nic_bind +%endif + +%if %{with examples} +%files examples +%defattr(-,root,root) +%{_bindir}/dpdk_example_* +%doc %{sdkdir}/examples +%endif + +%changelog diff --git a/dpdk.changes b/dpdk.changes index 39dbd43..892dd03 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Tue Dec 13 13:29:03 UTC 2016 - marco.varlese@suse.com + +- Added dependency on gcc6 to build for aarch64 (armv8a) successfully + +------------------------------------------------------------------- +Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com + +- Fixed paths using %{name} to have the dpdk.spec aligned with dpdk-thunderx.spec + +------------------------------------------------------------------- +Mon Dec 12 11:08:37 UTC 2016 - marco.varlese@suse.com + +- Added back in all the architectures to keep .spec files aligned + * Driving thunderx platform architectural dependency via the ExclusiveArch tag + +------------------------------------------------------------------- +Mon Dec 12 10:30:00 UTC 2016 - mvarlese@suse.com + +- Added support to build code for Thunderx platform: + * New patch (0001-rte-vars-fix-for-thunderx.patch) to fix DPDK cross-compile environment +- Introduced new dpdk-thunderx.spec file: + * Removed architectures not supporting Thunderx platform (e.g. x86) + * Added dependency on gcc v5.0 for armv8a-crc + ------------------------------------------------------------------- Wed Nov 30 16:51:47 UTC 2016 - mchandras@suse.de diff --git a/dpdk.spec b/dpdk.spec index ef96b64..3682cb9 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -57,6 +57,8 @@ Source: http://fast.dpdk.org/rel/%{name}-%{version}.tar.xz Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch BuildRequires: doxygen BuildRequires: fdupes +# Required to build on aarch64 (gcc option armv8-a+crc) +BuildRequires: gcc6 BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel @@ -108,13 +110,13 @@ Example applications utilizing the Data Plane Development Kit, such as L2 and L3 forwarding. %endif -%define sdkdir %{_datadir}/%{name} -%define docdir %{_docdir}/%{name} -%define incdir %{_includedir}/%{name} -%define pmddir %{_libdir}/%{name}-pmds +%define sdkdir %{_datadir}/dpdk +%define docdir %{_docdir}/dpdk +%define incdir %{_includedir}/dpdk +%define pmddir %{_libdir}/dpdk-pmds %prep -%setup -q -n %{name}-stable-%{version} +%setup -q -n dpdk-stable-%{version} %patch1 -p1 -z .enic %build From c9bcc2c493316296c09eb43d92bb14819e3fc3f95da4ef7cfa2e7dec4f66f85a Mon Sep 17 00:00:00 2001 From: Nirmoy Das Date: Mon, 2 Jan 2017 16:48:12 +0000 Subject: [PATCH 2/6] Accepting request 448539 from home:ndas:branches:network OBS-URL: https://build.opensuse.org/request/show/448539 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=22 --- dpdk-thunderx.spec | 2 +- dpdk.changes | 5 ----- dpdk.spec | 4 +--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec index 5ae8ae0..9f307ea 100644 --- a/dpdk-thunderx.spec +++ b/dpdk-thunderx.spec @@ -1,7 +1,7 @@ # # spec file for package dpdk-thunderx # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/dpdk.changes b/dpdk.changes index 892dd03..4e8e67c 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Tue Dec 13 13:29:03 UTC 2016 - marco.varlese@suse.com - -- Added dependency on gcc6 to build for aarch64 (armv8a) successfully - ------------------------------------------------------------------- Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com diff --git a/dpdk.spec b/dpdk.spec index 3682cb9..33ae7b7 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,7 +1,7 @@ # # spec file for package dpdk # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -57,8 +57,6 @@ Source: http://fast.dpdk.org/rel/%{name}-%{version}.tar.xz Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch BuildRequires: doxygen BuildRequires: fdupes -# Required to build on aarch64 (gcc option armv8-a+crc) -BuildRequires: gcc6 BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel From b800097b2e1eb0c27996da645316336650a7d000ec36e0981a57a1da3d7de40b Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 5 Jan 2017 09:51:54 +0000 Subject: [PATCH 3/6] Accepting request 448772 from home:ndas:branches:network - Add pre_checkin.sh to generate the dpdk-thunderx.spec file - Add pre_checkin.sh to generate the dpdk-thunderx.spec file OBS-URL: https://build.opensuse.org/request/show/448772 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=23 --- 0001-rte-vars-fix-for-thunderx.patch | 11 ----------- dpdk-thunderx.changes | 5 ++--- dpdk-thunderx.spec | 22 +++++++++------------- dpdk.changes | 4 ++++ dpdk.spec | 4 +++- pre_checkin.sh | 20 ++++++++++++++++++++ 6 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 0001-rte-vars-fix-for-thunderx.patch create mode 100644 pre_checkin.sh diff --git a/0001-rte-vars-fix-for-thunderx.patch b/0001-rte-vars-fix-for-thunderx.patch deleted file mode 100644 index 6519d8c..0000000 --- a/0001-rte-vars-fix-for-thunderx.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mk/machine/thunderx/rte.vars.mk 2016-12-07 13:49:18.397009133 +0100 -+++ mk/machine/thunderx/rte.vars.mk 2016-12-07 13:49:37.537806161 +0100 -@@ -47,7 +47,7 @@ - # - - # ARCH = --CROSS ?= aarch64-thunderx-linux-gnu- -+# CROSS ?= aarch64-thunderx-linux-gnu- - # MACHINE_CFLAGS = - # MACHINE_LDFLAGS = - # MACHINE_ASFLAGS = diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes index 892dd03..1d38325 100644 --- a/dpdk-thunderx.changes +++ b/dpdk-thunderx.changes @@ -1,8 +1,7 @@ ------------------------------------------------------------------- -Tue Dec 13 13:29:03 UTC 2016 - marco.varlese@suse.com - -- Added dependency on gcc6 to build for aarch64 (armv8a) successfully +Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de +- Add pre_checkin.sh to generate the dpdk-thunderx.spec file ------------------------------------------------------------------- Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec index 9f307ea..7d75e09 100644 --- a/dpdk-thunderx.spec +++ b/dpdk-thunderx.spec @@ -40,11 +40,12 @@ %bcond_without examples # Add option to build without tools %bcond_without tools - +# Do NOT edit this auto generated file! Edit dpdk.spec instead +# and run 'pre_checkin.sh' before committing Name: dpdk-thunderx Version: 16.07.2 Release: 0 -Summary: Set of libraries and drivers for fast packet processing +Summary: Set of libraries and drivers for fast packet processing (thunderx) License: BSD-3-Clause and GPL-2.0 and LGPL-2.1 Group: System/Libraries Url: http://dpdk.org @@ -56,14 +57,8 @@ Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz # However, the problem still exists and the fix has to find its way to the # upstream code. Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch -# PATCH-FIX-OPENSUSE 0001-rte-vars-fix-for-thunderx.patch -# This patch comments the CROSS compilation (broken) in the mk file for ThunderX -# Upstreaming of this patch will have to be pursued. -Patch2: 0001-rte-vars-fix-for-thunderx.patch BuildRequires: doxygen BuildRequires: fdupes -# Required to build on aarch64 (gcc option armv8-a+crc) -BuildRequires: gcc6 BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel @@ -75,7 +70,7 @@ The Data Plane Development Kit is a set of libraries and drivers for fast packet processing in the user space. %package devel -Summary: Data Plane Development Kit development files +Summary: Data Plane Development Kit development files (thunderx) Group: Development/Libraries/C and C++ Requires: %{name} = %{version} @@ -84,7 +79,7 @@ This package contains the headers and other files needed for developing applications with the Data Plane Development Kit. %package doc -Summary: Data Plane Development Kit API documentation +Summary: Data Plane Development Kit API documentation (thunderx) Group: System/Libraries BuildArch: noarch @@ -93,7 +88,7 @@ API programming documentation for the Data Plane Development Kit. %if %{with tools} %package tools -Summary: Tools for setting up Data Plane Development Kit environment +Summary: Tools for setting up Data Plane Development Kit environment (thunderx) Group: System/Libraries Requires: %{name} = %{version} Requires: findutils @@ -107,7 +102,7 @@ This package contains tools for setting up Data Plane Development Kit environmen %if %{with examples} %package examples -Summary: Data Plane Development Kit example applications +Summary: Data Plane Development Kit example applications (thunderx) Group: System/Libraries BuildRequires: libvirt-devel @@ -124,7 +119,8 @@ as L2 and L3 forwarding. %prep %setup -q -n dpdk-stable-%{version} %patch1 -p1 -z .enic -%patch2 -p0 -z .rte +# This fixes CROSS compilation (broken) in the mk file for ThunderX +sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk %build # set up a method for modifying the resulting .config file diff --git a/dpdk.changes b/dpdk.changes index 4e8e67c..1d38325 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,4 +1,8 @@ ------------------------------------------------------------------- +Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de + +- Add pre_checkin.sh to generate the dpdk-thunderx.spec file +------------------------------------------------------------------- Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com - Fixed paths using %{name} to have the dpdk.spec aligned with dpdk-thunderx.spec diff --git a/dpdk.spec b/dpdk.spec index 33ae7b7..01fed52 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -47,7 +47,7 @@ Summary: Set of libraries and drivers for fast packet processing License: BSD-3-Clause and GPL-2.0 and LGPL-2.1 Group: System/Libraries Url: http://dpdk.org -Source: http://fast.dpdk.org/rel/%{name}-%{version}.tar.xz +Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz # PATCH-FIX-OPENSUSE 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch # This patch was originally taken from the fedora package but they have # removed it since then because of @@ -116,6 +116,8 @@ as L2 and L3 forwarding. %prep %setup -q -n dpdk-stable-%{version} %patch1 -p1 -z .enic +# This fixes CROSS compilation (broken) in the mk file for ThunderX +sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk %build # set up a method for modifying the resulting .config file diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..dbad2cc --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Start fresh +for f in spec changes; do + cp dpdk.$f dpdk-thunderx.$f || exit 1 +done + +# +#- Add comment about generated file +#- Fix {,sub-}package name, description, summary +#- Enable the dpdk conditional build +sed -i -e "/^Name:.*dpdk$/i \ +# Do NOT edit this auto generated file! Edit dpdk.spec instead\n\ +# and run 'pre_checkin.sh' before committing" \ +-e "/^#\s*spec file/s/dpdk$/&-thunderx/" \ +-e "/^Name:/s/dpdk/&-thunderx/g" \ +-e "/^Summary:/s/^.*$/&\ \(thunderx\)/g" \ +-e "/^%define machine2 armv8a/s/armv8a/thunderx/g" \ +-e "/^ExclusiveArch/a Conflicts: dpdk" \ +dpdk-thunderx.spec || exit 1 From 4ff3c542ae81dd0606744b2f5ac62a546dc997fb545ea5e7f26e2c87bb856392 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 12 Jan 2017 12:20:21 +0000 Subject: [PATCH 4/6] Accepting request 449831 from home:ndas:branches:network - Added support to build code for Thunderx platform(fate#321960). - Added support to build code for Thunderx platform(fate#321960). OBS-URL: https://build.opensuse.org/request/show/449831 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=24 --- dpdk-thunderx.changes | 3 +-- dpdk.changes | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes index 1d38325..f8c8e26 100644 --- a/dpdk-thunderx.changes +++ b/dpdk-thunderx.changes @@ -16,8 +16,7 @@ Mon Dec 12 11:08:37 UTC 2016 - marco.varlese@suse.com ------------------------------------------------------------------- Mon Dec 12 10:30:00 UTC 2016 - mvarlese@suse.com -- Added support to build code for Thunderx platform: - * New patch (0001-rte-vars-fix-for-thunderx.patch) to fix DPDK cross-compile environment +- Added support to build code for Thunderx platform(fate#321960). - Introduced new dpdk-thunderx.spec file: * Removed architectures not supporting Thunderx platform (e.g. x86) * Added dependency on gcc v5.0 for armv8a-crc diff --git a/dpdk.changes b/dpdk.changes index 1d38325..f8c8e26 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -16,8 +16,7 @@ Mon Dec 12 11:08:37 UTC 2016 - marco.varlese@suse.com ------------------------------------------------------------------- Mon Dec 12 10:30:00 UTC 2016 - mvarlese@suse.com -- Added support to build code for Thunderx platform: - * New patch (0001-rte-vars-fix-for-thunderx.patch) to fix DPDK cross-compile environment +- Added support to build code for Thunderx platform(fate#321960). - Introduced new dpdk-thunderx.spec file: * Removed architectures not supporting Thunderx platform (e.g. x86) * Added dependency on gcc v5.0 for armv8a-crc From cc118bc9239acdb67dd8af3d8ea64b796f2f5c62706e282b8f0363ec9def9cea Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 20 Jan 2017 11:01:04 +0000 Subject: [PATCH 5/6] Accepting request 451583 from home:ndas:branches:network - Added gcc-6 as default compiler for CRC/mtune & other optimizations. - Added gcc-6 as default compiler for CRC/mtune & other optimizations. OBS-URL: https://build.opensuse.org/request/show/451583 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=25 --- dpdk-thunderx.changes | 5 +++++ dpdk-thunderx.spec | 9 +++++---- dpdk.changes | 5 +++++ dpdk.spec | 9 +++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes index f8c8e26..f03b4dd 100644 --- a/dpdk-thunderx.changes +++ b/dpdk-thunderx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 20 11:01:47 CET 2017 - ndas@suse.de + +- Added gcc-6 as default compiler for CRC/mtune & other optimizations. + ------------------------------------------------------------------- Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec index 7d75e09..c205b36 100644 --- a/dpdk-thunderx.spec +++ b/dpdk-thunderx.spec @@ -59,6 +59,7 @@ Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch BuildRequires: doxygen BuildRequires: fdupes +BuildRequires: gcc6 BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel @@ -145,7 +146,7 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds" # 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=%{target} T=%{target} %{?_smp_mflags} config +make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config setconf CONFIG_RTE_MACHINE '"%{machine2}"' # Disable experimental features @@ -176,11 +177,11 @@ setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n setconf CONFIG_RTE_LIBRTE_PMD_RING n %endif -make V=1 O=%{target} %{?_smp_mflags} -make V=1 O=%{target} %{?_smp_mflags} doc-api-html +make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} +make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} doc-api-html %if %{with examples} -make V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples +make CC=gcc-6 V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples %endif %install diff --git a/dpdk.changes b/dpdk.changes index f8c8e26..f03b4dd 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 20 11:01:47 CET 2017 - ndas@suse.de + +- Added gcc-6 as default compiler for CRC/mtune & other optimizations. + ------------------------------------------------------------------- Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de diff --git a/dpdk.spec b/dpdk.spec index 01fed52..ef226c9 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -57,6 +57,7 @@ Source: http://fast.dpdk.org/rel/dpdk-%{version}.tar.xz Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch BuildRequires: doxygen BuildRequires: fdupes +BuildRequires: gcc6 BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel @@ -142,7 +143,7 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds" # 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=%{target} T=%{target} %{?_smp_mflags} config +make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config setconf CONFIG_RTE_MACHINE '"%{machine2}"' # Disable experimental features @@ -173,11 +174,11 @@ setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n setconf CONFIG_RTE_LIBRTE_PMD_RING n %endif -make V=1 O=%{target} %{?_smp_mflags} -make V=1 O=%{target} %{?_smp_mflags} doc-api-html +make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} +make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} doc-api-html %if %{with examples} -make V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples +make CC=gcc-6 V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples %endif %install From fe796e1570ce80bc6db6610386d3da616fa3d769894bf99166b2834db00a8fcc Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 24 Jan 2017 10:01:26 +0000 Subject: [PATCH 6/6] Accepting request 452112 from home:ndas:branches:network - Fix possible parallel installation of dpdk subpackages. - Fix possible parallel installation of dpdk subpackages. OBS-URL: https://build.opensuse.org/request/show/452112 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=26 --- dpdk-thunderx.changes | 2 ++ dpdk-thunderx.spec | 11 ++++++++++- dpdk.changes | 2 ++ dpdk.spec | 10 ++++++++++ pre_checkin.sh | 1 - 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dpdk-thunderx.changes b/dpdk-thunderx.changes index f03b4dd..2a9d12b 100644 --- a/dpdk-thunderx.changes +++ b/dpdk-thunderx.changes @@ -2,11 +2,13 @@ Fri Jan 20 11:01:47 CET 2017 - ndas@suse.de - Added gcc-6 as default compiler for CRC/mtune & other optimizations. +- Fix possible parallel installation of dpdk subpackages. ------------------------------------------------------------------- Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de - Add pre_checkin.sh to generate the dpdk-thunderx.spec file + ------------------------------------------------------------------- Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com diff --git a/dpdk-thunderx.spec b/dpdk-thunderx.spec index c205b36..5ae7e2f 100644 --- a/dpdk-thunderx.spec +++ b/dpdk-thunderx.spec @@ -64,7 +64,8 @@ BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel ExclusiveArch: aarch64 x86_64 %ix86 ppc64le -Conflicts: dpdk +Provides: dpdk-any = %{version} +Conflicts: otherproviders(dpdk-any) %description The Data Plane Development Kit is a set of libraries and drivers for @@ -74,6 +75,8 @@ fast packet processing in the user space. Summary: Data Plane Development Kit development files (thunderx) Group: Development/Libraries/C and C++ Requires: %{name} = %{version} +Provides: dpdk-any-devel = %{version} +Conflicts: otherproviders(dpdk-any-devel) %description devel This package contains the headers and other files needed for developing @@ -83,6 +86,8 @@ applications with the Data Plane Development Kit. Summary: Data Plane Development Kit API documentation (thunderx) Group: System/Libraries BuildArch: noarch +Provides: dpdk-any-doc = %{version} +Conflicts: otherproviders(dpdk-any-doc) %description doc API programming documentation for the Data Plane Development Kit. @@ -96,6 +101,8 @@ Requires: findutils Requires: iproute Requires: kmod Requires: pciutils +Provides: dpdk-any-tools = %{version} +Conflicts: otherproviders(dpdk-any-tools) %description tools This package contains tools for setting up Data Plane Development Kit environment @@ -106,6 +113,8 @@ This package contains tools for setting up Data Plane Development Kit environmen Summary: Data Plane Development Kit example applications (thunderx) Group: System/Libraries BuildRequires: libvirt-devel +Provides: dpdk-any-examples = %{version} +Conflicts: otherproviders(dpdk-any-examples) %description examples Example applications utilizing the Data Plane Development Kit, such diff --git a/dpdk.changes b/dpdk.changes index f03b4dd..2a9d12b 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -2,11 +2,13 @@ Fri Jan 20 11:01:47 CET 2017 - ndas@suse.de - Added gcc-6 as default compiler for CRC/mtune & other optimizations. +- Fix possible parallel installation of dpdk subpackages. ------------------------------------------------------------------- Wed Jan 4 18:11:17 CET 2017 - ndas@suse.de - Add pre_checkin.sh to generate the dpdk-thunderx.spec file + ------------------------------------------------------------------- Mon Dec 12 11:35:44 UTC 2016 - marco.varlese@suse.com diff --git a/dpdk.spec b/dpdk.spec index ef226c9..727931b 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -62,6 +62,8 @@ BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: zlib-devel ExclusiveArch: aarch64 x86_64 %ix86 ppc64le +Provides: dpdk-any = %{version} +Conflicts: otherproviders(dpdk-any) %description The Data Plane Development Kit is a set of libraries and drivers for @@ -71,6 +73,8 @@ fast packet processing in the user space. Summary: Data Plane Development Kit development files Group: Development/Libraries/C and C++ Requires: %{name} = %{version} +Provides: dpdk-any-devel = %{version} +Conflicts: otherproviders(dpdk-any-devel) %description devel This package contains the headers and other files needed for developing @@ -80,6 +84,8 @@ applications with the Data Plane Development Kit. Summary: Data Plane Development Kit API documentation Group: System/Libraries BuildArch: noarch +Provides: dpdk-any-doc = %{version} +Conflicts: otherproviders(dpdk-any-doc) %description doc API programming documentation for the Data Plane Development Kit. @@ -93,6 +99,8 @@ Requires: findutils Requires: iproute Requires: kmod Requires: pciutils +Provides: dpdk-any-tools = %{version} +Conflicts: otherproviders(dpdk-any-tools) %description tools This package contains tools for setting up Data Plane Development Kit environment @@ -103,6 +111,8 @@ This package contains tools for setting up Data Plane Development Kit environmen Summary: Data Plane Development Kit example applications Group: System/Libraries BuildRequires: libvirt-devel +Provides: dpdk-any-examples = %{version} +Conflicts: otherproviders(dpdk-any-examples) %description examples Example applications utilizing the Data Plane Development Kit, such diff --git a/pre_checkin.sh b/pre_checkin.sh index dbad2cc..4061ca4 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -16,5 +16,4 @@ sed -i -e "/^Name:.*dpdk$/i \ -e "/^Name:/s/dpdk/&-thunderx/g" \ -e "/^Summary:/s/^.*$/&\ \(thunderx\)/g" \ -e "/^%define machine2 armv8a/s/armv8a/thunderx/g" \ --e "/^ExclusiveArch/a Conflicts: dpdk" \ dpdk-thunderx.spec || exit 1