Accepting request 456738 from home:ndas:branches:network

- Enable rte_kni kernel module for dpdk(fate#322394).
  [+preamble]

- Enable rte_kni kernel module for dpdk(fate#322394).
  [+preamble]

OBS-URL: https://build.opensuse.org/request/show/456738
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=30
This commit is contained in:
Markos Chandras 2017-02-13 11:42:18 +00:00 committed by Git OBS Bridge
parent 4a22c89237
commit 04530a0ab2
5 changed files with 83 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 10 11:24:27 CET 2017 - ndas@suse.de
- Enable rte_kni kernel module for dpdk(fate#322394).
[+preamble]
-------------------------------------------------------------------
Thu Feb 2 15:21:14 CET 2017 - ndas@suse.de

View File

@ -22,7 +22,7 @@
%define machine native
%define target x86_64-%{machine}-linuxapp-gcc
%endif
%ifarch %ix86
%ifarch %{ix86}
%define machine native
%define target i686-%{machine}-linuxapp-gcc
%endif
@ -34,7 +34,6 @@
%define machine2 power8
%define target ppc_64-%{machine2}-linuxapp-gcc
%endif
%bcond_without shared
# Add option to build without examples
%bcond_without examples
@ -50,6 +49,7 @@ 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
Source1: preamble
# 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
@ -62,6 +62,7 @@ BuildRequires: fdupes
BuildRequires: gcc6
BuildRequires: libnuma-devel
BuildRequires: libpcap-devel
BuildRequires: pesign-obs-integration
BuildRequires: zlib-devel
ExclusiveArch: aarch64 x86_64 %ix86 ppc64le
Provides: dpdk-any = %{version}
@ -121,6 +122,15 @@ Example applications utilizing the Data Plane Development Kit, such
as L2 and L3 forwarding.
%endif
%package kmp
Summary: DPDK KNI kernel module (thunderx)
Group: System/Kernel
BuildRequires: %{kernel_module_package_buildreqs}
%suse_kernel_module_package -p %{_sourcedir}/preamble pae 64kb
%description kmp
The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
%define sdkdir %{_datadir}/dpdk
%define docdir %{_docdir}/dpdk
%define incdir %{_includedir}/dpdk
@ -171,9 +181,6 @@ 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
@ -185,6 +192,13 @@ setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n
%ifarch ppc64le
setconf CONFIG_RTE_LIBRTE_PMD_RING n
%endif
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
for flavor in %{flavors_to_build}; do
cp -r %{target} %{target}-$flavor
cd %{target}-$flavor
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
cd -
done
make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags}
make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} doc-api-html
@ -194,6 +208,19 @@ make CC=gcc-6 V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples
%endif
%install
# export needed for kmp package
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
# needssslcertforbuild
export BRP_PESIGN_FILES="*.ko"
for flavor in %{flavors_to_build}; do
cd %{target}-$flavor
%make_install KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor prefix=%{_usr} libdir=%{_libdir}
cd -
done
# In case dpdk-devel is installed
unset RTE_SDK RTE_INCLUDE RTE_TARGET
@ -251,7 +278,7 @@ 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}
%fdupes %{buildroot}/%{_prefix}
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
@ -277,7 +304,7 @@ ln -s %{_sbindir}/dpdk-devbind %{buildroot}%{_sbindir}/dpdk_nic_bind
%defattr(-,root,root)
#BSD
%docdir
%doc LICENSE.GPL LICENSE.LGPL
%doc LICENSE.GPL LICENSE.LGPL
%files devel
%defattr(-,root,root)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 10 11:24:27 CET 2017 - ndas@suse.de
- Enable rte_kni kernel module for dpdk(fate#322394).
[+preamble]
-------------------------------------------------------------------
Thu Feb 2 15:21:14 CET 2017 - ndas@suse.de

View File

@ -22,7 +22,7 @@
%define machine native
%define target x86_64-%{machine}-linuxapp-gcc
%endif
%ifarch %ix86
%ifarch %{ix86}
%define machine native
%define target i686-%{machine}-linuxapp-gcc
%endif
@ -34,7 +34,6 @@
%define machine2 power8
%define target ppc_64-%{machine2}-linuxapp-gcc
%endif
%bcond_without shared
# Add option to build without examples
%bcond_without examples
@ -48,6 +47,7 @@ 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
Source1: preamble
# 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
@ -60,6 +60,7 @@ BuildRequires: fdupes
BuildRequires: gcc6
BuildRequires: libnuma-devel
BuildRequires: libpcap-devel
BuildRequires: pesign-obs-integration
BuildRequires: zlib-devel
ExclusiveArch: aarch64 x86_64 %ix86 ppc64le
Provides: dpdk-any = %{version}
@ -119,6 +120,15 @@ Example applications utilizing the Data Plane Development Kit, such
as L2 and L3 forwarding.
%endif
%package kmp
Summary: DPDK KNI kernel module
Group: System/Kernel
BuildRequires: %{kernel_module_package_buildreqs}
%suse_kernel_module_package -p %{_sourcedir}/preamble pae 64kb
%description kmp
The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.
%define sdkdir %{_datadir}/dpdk
%define docdir %{_docdir}/dpdk
%define incdir %{_includedir}/dpdk
@ -169,9 +179,6 @@ 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
@ -183,6 +190,13 @@ setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n
%ifarch ppc64le
setconf CONFIG_RTE_LIBRTE_PMD_RING n
%endif
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
for flavor in %{flavors_to_build}; do
cp -r %{target} %{target}-$flavor
cd %{target}-$flavor
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
cd -
done
make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags}
make CC=gcc-6 V=1 O=%{target} %{?_smp_mflags} doc-api-html
@ -192,6 +206,19 @@ make CC=gcc-6 V=1 O=%{target}/examples T=%{target} %{?_smp_mflags} examples
%endif
%install
# export needed for kmp package
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
# needssslcertforbuild
export BRP_PESIGN_FILES="*.ko"
for flavor in %{flavors_to_build}; do
cd %{target}-$flavor
%make_install KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor prefix=%{_usr} libdir=%{_libdir}
cd -
done
# In case dpdk-devel is installed
unset RTE_SDK RTE_INCLUDE RTE_TARGET
@ -249,7 +276,7 @@ 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}
%fdupes %{buildroot}/%{_prefix}
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
@ -275,7 +302,7 @@ ln -s %{_sbindir}/dpdk-devbind %{buildroot}%{_sbindir}/dpdk_nic_bind
%defattr(-,root,root)
#BSD
%docdir
%doc LICENSE.GPL LICENSE.LGPL
%doc LICENSE.GPL LICENSE.LGPL
%files devel
%defattr(-,root,root)

3
preamble Normal file
View File

@ -0,0 +1,3 @@
Requires: kernel-%1
Enhances: kernel-%1
Supplements: packageand(kernel-%1:%{-n*})