Accepting request 407870 from home:ndas:branches:network

- 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 .

OBS-URL: https://build.opensuse.org/request/show/407870
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=11
This commit is contained in:
Dirk Mueller 2016-07-12 09:27:16 +00:00 committed by Git OBS Bridge
parent 8de6c30512
commit 000c38a217
3 changed files with 90 additions and 41 deletions

View File

@ -0,0 +1,28 @@
From a81e0a0f73a834d2cd8e5fd3237fac85574ad778 Mon Sep 17 00:00:00 2001
From: Nirmoy Das <ndas@suse.de>
Date: Mon, 11 Jul 2016 11:56:27 +0200
Subject: [PATCH] PAGE_SIZE constant is not defined on ARM since multiple
values are possible, so DPDK needs to dynamically get the page size.
---
drivers/net/bnx2x/bnx2x.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 67af5da..766d66b 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -34,6 +34,10 @@
#define BNX2X_PMD_VERSION_MINOR 0
#define BNX2X_PMD_VERSION_PATCH 0
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
+#endif
+
static inline const char *
bnx2x_pmd_version(void)
{
--
2.9.0

View File

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

View File

@ -16,16 +16,26 @@
#
%define machine native
%ifarch x86_64
%define machine native
%define target x86_64-%{machine}-linuxapp-gcc
%else if %ix86
%endif
%ifarch %ix86
%define machine native
%define target i686-%{machine}-linuxapp-gcc
%endif
%bcond_without shared
%ifarch aarch64
%define machine armv8a
%define target arm64-%{machine}-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
%bcond_without examples
%endif
%bcond_without shared
# Add option to build without tools
%bcond_without tools
Name: dpdk
@ -98,6 +108,8 @@ Patch32: 0032-virtio-fix-crash-in-statistics-functions.patch
Patch33: 0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch
#PATCH-FIX-UPSTREAM 0034-virtio-fix-restart.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
#
# Patches for build fixes
@ -121,18 +133,12 @@ Patch105: 0105-e1000-fix-missing-link-interrupt-check-brackets.patch
Patch106: 0106-app-test-fix-missing-brackets.patch
#PATCH-FIX-UPSTREAM: 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch
Patch107: 0107-examples-ip_pipeline-use-unsigned-constants-for-left.patch
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: libnuma-devel
BuildRequires: libpcap-devel
BuildRequires: zlib-devel
#
# The DPDK is designed to optimize througput of network traffic using, among
# other techniques, carefully crafted x86 assembly instructions. As such it
# currently (and likely never will) run on non-x86 platforms
#
ExclusiveArch: x86_64 %ix86
ExclusiveArch: aarch64 x86_64 %ix86
%description
The Data Plane Development Kit is a set of libraries and drivers for
@ -149,6 +155,7 @@ applications with the Data Plane Development Kit.
%package doc
Summary: Data Plane Development Kit API documentation
Group: System/Libraries
BuildArch: noarch
%description doc
@ -157,6 +164,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
Group: System/Libraries
Requires: %{name} = %{version}
Requires: findutils
Requires: iproute
@ -170,6 +178,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
Group: System/Libraries
BuildRequires: libvirt-devel
%description examples
@ -218,6 +227,7 @@ as L2 and L3 forwarding.
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
# Build fixes
%patch99 -p1 -z .rtetoolchain
@ -255,7 +265,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 '"default"'
setconf CONFIG_RTE_MACHINE '"%{machine}"'
# Disable experimental features
setconf CONFIG_RTE_NEXT_ABI n
setconf CONFIG_RTE_LIBRTE_CRYPTODEV n
@ -395,9 +405,11 @@ rm -f %{buildroot}%{_bindir}/*.map
%if %{with tools}
%exclude %{sdkdir}/tools/
%endif
%if %{with examples}
%exclude %{sdkdir}/examples/
%endif
%{_sysconfdir}/profile.d/dpdk-sdk-*.*
%if ! %{with shared}
%{_libdir}/*.a