SHA256
1
0
forked from pool/dpdk

Accepting request 417973 from network

1

OBS-URL: https://build.opensuse.org/request/show/417973
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dpdk?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2016-08-09 20:15:52 +00:00 committed by Git OBS Bridge
commit 99083edb59
5 changed files with 140 additions and 11 deletions

View File

@ -0,0 +1,52 @@
From 1f1d7f76edc37acc879746ef3822dae54cbfe2a3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas.monjalon@6wind.com>
Date: Fri, 5 Feb 2016 15:43:56 +0100
Subject: [PATCH] examples: fix build dependencies
When building for ARM some examples were failing to compile because
of some dependencies disabled.
Declaring these dependencies prevent from trying to compile some
not supported examples.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
examples/Makefile | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/examples/Makefile b/examples/Makefile
index 1cb4785..1665df1 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -46,21 +46,25 @@ endif
DIRS-y += ethtool
DIRS-y += exception_path
DIRS-y += helloworld
-DIRS-y += ip_pipeline
-DIRS-y += ip_reassembly
+DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += ip_pipeline
+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
+DIRS-$(CONFIG_RTE_IP_FRAG) += ip_reassembly
DIRS-$(CONFIG_RTE_IP_FRAG) += ip_fragmentation
+endif
DIRS-y += ipv4_multicast
DIRS-$(CONFIG_RTE_LIBRTE_KNI) += kni
DIRS-y += l2fwd
DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += l2fwd-ivshmem
DIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += l2fwd-jobstats
DIRS-y += l2fwd-keepalive
-DIRS-y += l3fwd
+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += l3fwd
DIRS-$(CONFIG_RTE_LIBRTE_ACL) += l3fwd-acl
+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
DIRS-$(CONFIG_RTE_LIBRTE_POWER) += l3fwd-power
DIRS-y += l3fwd-vf
+endif
DIRS-y += link_status_interrupt
-DIRS-y += load_balancer
+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += load_balancer
DIRS-y += multi_process
DIRS-y += netmap_compat/bridge
DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += packet_ordering
--
2.6.6

View File

@ -0,0 +1,32 @@
From 71e6e8c51906102ba1f7da0a75f29f9c26b651f0 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas.monjalon@6wind.com>
Date: Fri, 5 Feb 2016 15:38:02 +0100
Subject: [PATCH] examples/ethtool: fix build
When building for ARM, the spinlock structure was not found.
It appears to be a mismatch with rwlock which is not used in this file.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
examples/ethtool/ethtool-app/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index e21abcd..2c655d8 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <rte_common.h>
-#include <rte_rwlock.h>
+#include <rte_spinlock.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
--
2.6.6

18
_constraints Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<constraints>
<overwrite>
<conditions>
<arch>i586</arch>
<arch>x86_64</arch>
</conditions>
<hardware>
<cpu>
<flag>mmx</flag>
<flag>sse</flag>
<flag>sse2</flag>
<flag>sse3</flag>
</cpu>
</hardware>
</overwrite>
</constraints>

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
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

View File

@ -16,6 +16,8 @@
#
%define machine native
%define machine2 default
%ifarch x86_64
%define machine native
%define target x86_64-%{machine}-linuxapp-gcc
@ -25,16 +27,16 @@
%define target i686-%{machine}-linuxapp-gcc
%endif
%ifarch aarch64
%define machine armv8a
%define target arm64-%{machine}-linuxapp-gcc
%define machine2 armv8a
%define target arm64-%{machine2}-linuxapp-gcc
%endif
# Examples seems to contain lots of Intel specific code
# so disabling examples package for aarch64 till we find
# time to fix them all. - TODO
%ifnarch aarch64
# Add option to build without examples
%ifarch ppc64le
%define machine2 power8
%define target ppc_64-%{machine2}-linuxapp-gcc
%endif
%bcond_without examples
%endif
%bcond_without shared
# Add option to build without tools
%bcond_without tools
@ -110,6 +112,10 @@ Patch33: 0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch
Patch34: 0034-virtio-fix-restart.patch
#PATCH-FIX-OPENSUSE 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi
Patch35: 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch
#PATCH-FIX-UPSTREAM 0036-examples-fix-build-dependencies
Patch36: 0036-examples-fix-build-dependencies.patch
#PATCH-FIX-UPSTREAM 0037-examples-ethtool-fix-build
Patch37: 0037-examples-ethtool-fix-build.patch
#
# Patches for build fixes
@ -138,7 +144,7 @@ BuildRequires: fdupes
BuildRequires: libnuma-devel
BuildRequires: libpcap-devel
BuildRequires: zlib-devel
ExclusiveArch: aarch64 x86_64 %ix86
ExclusiveArch: aarch64 x86_64 %ix86 ppc64le
%description
The Data Plane Development Kit is a set of libraries and drivers for
@ -228,6 +234,8 @@ as L2 and L3 forwarding.
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
# Build fixes
%patch99 -p1 -z .rtetoolchain
@ -265,7 +273,7 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
setconf CONFIG_RTE_MACHINE '"%{machine}"'
setconf CONFIG_RTE_MACHINE '"%{machine2}"'
# Disable experimental features
setconf CONFIG_RTE_NEXT_ABI n
setconf CONFIG_RTE_LIBRTE_CRYPTODEV n
@ -287,6 +295,13 @@ setconf CONFIG_RTE_KNI_PREEMPT_DEFAULT n
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
@ -340,7 +355,7 @@ endif
EOF
# Fixup target machine mismatch
sed -i -e 's:-%{machine}-:-default-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk*
sed -i -e 's:-%{machine}-:-%{machine2}-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk*
# Upstream has an option to build a combined library but it's bloatware which
# wont work at all when library versions start moving, replace it with a