Accepting request 485850 from network
1 OBS-URL: https://build.opensuse.org/request/show/485850 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dpdk?expand=0&rev=13
This commit is contained in:
commit
d076a985d2
33
0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
Normal file
33
0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From e6b63f9d941c8b27c4c1cbeab2c7cdbefb7747ba Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nirmoy Das <ndas@suse.de>
|
||||||
|
Date: Fri, 31 Mar 2017 11:40:42 +0200
|
||||||
|
Subject: [PATCH] kni: define HAVE_VF_VLAN_PROTO for SLES12SP3
|
||||||
|
|
||||||
|
Add support for SLES12SP3, which uses kernel 4.4,
|
||||||
|
but backported features from newer kernels.
|
||||||
|
|
||||||
|
Signed-off-by: Nirmoy Das <ndas@suse.de>
|
||||||
|
---
|
||||||
|
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||||
|
index 84826b26e..3d22d8e69 100644
|
||||||
|
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||||
|
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||||
|
@@ -3929,8 +3929,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
|
||||||
|
#define vlan_tx_tag_present skb_vlan_tag_present
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) )
|
||||||
|
+#if (( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) ) \
|
||||||
|
+ || (defined(CONFIG_SUSE_KERNEL) && \
|
||||||
|
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,59))))
|
||||||
|
#define HAVE_VF_VLAN_PROTO
|
||||||
|
-#endif /* >= 4.9.0 */
|
||||||
|
+#endif /* >= 4.9.0, >= SLES12SP3 */
|
||||||
|
|
||||||
|
#endif /* _KCOMPAT_H_ */
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 4 15:28:20 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Fix dpdk KMP build fails(bsc#1031750)
|
||||||
|
- enable igb_uio kernel module(fate#322394)
|
||||||
|
- update kernel version for SLES12SP3 4.4.59 for bsc#1031705
|
||||||
|
[*0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 30 16:50:07 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Enable HAVE_VF_VLAN_PROTO for SLE12SP3(bsc#1031705).
|
||||||
|
[+0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 20 15:32:12 CET 2017 - ndas@suse.de
|
Mon Mar 20 15:32:12 CET 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ Source1: preamble
|
|||||||
# However, the problem still exists and the fix has to find its way to the
|
# However, the problem still exists and the fix has to find its way to the
|
||||||
# upstream code.
|
# upstream code.
|
||||||
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
||||||
|
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc6
|
BuildRequires: gcc6
|
||||||
@ -143,19 +144,47 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n dpdk-stable-16.11.1
|
%setup -q -n dpdk-stable-16.11.1
|
||||||
%patch1 -p1 -z .enic
|
%patch1 -p1 -z .enic
|
||||||
|
%patch2 -p1 -z .kni
|
||||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# set up a method for modifying the resulting .config file
|
# set up a method for modifying the resulting .config file
|
||||||
function setconf() {
|
function setconf() {
|
||||||
if grep -q ^$1= %{target}/.config; then
|
if grep -q ^$1= $3/.config; then
|
||||||
sed -i "s:^$1=.*$:$1=$2:g" %{target}/.config
|
sed -i "s:^$1=.*$:$1=$2:g" $3/.config
|
||||||
else
|
else
|
||||||
echo $1=$2 >> %{target}/.config
|
echo $1=$2 >> $3/.config
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setdefaultconf()
|
||||||
|
{
|
||||||
|
setconf CONFIG_RTE_MACHINE '"%{machine2}"' $1
|
||||||
|
# Disable experimental features
|
||||||
|
setconf CONFIG_RTE_NEXT_ABI n $1
|
||||||
|
|
||||||
|
# Enable automatic driver loading from this path
|
||||||
|
setconf CONFIG_RTE_EAL_PMD_PATH '"%{pmddir}"' $1
|
||||||
|
|
||||||
|
setconf CONFIG_RTE_LIBRTE_BNX2X_PMD y $1
|
||||||
|
setconf CONFIG_RTE_LIBRTE_PMD_PCAP y $1
|
||||||
|
setconf CONFIG_RTE_LIBRTE_VHOST_NUMA y $1
|
||||||
|
|
||||||
|
setconf CONFIG_RTE_EAL_IGB_UIO n $1
|
||||||
|
setconf CONFIG_RTE_KNI_KMOD n $1
|
||||||
|
|
||||||
|
%if %{with shared}
|
||||||
|
setconf CONFIG_RTE_BUILD_SHARED_LIB y $1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch aarch64 ppc64le
|
||||||
|
setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n $1
|
||||||
|
%endif
|
||||||
|
%ifarch ppc64le
|
||||||
|
setconf CONFIG_RTE_LIBRTE_PMD_RING n $1
|
||||||
|
%endif
|
||||||
|
}
|
||||||
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
|
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
|
||||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||||
|
|
||||||
@ -170,42 +199,20 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
|
|||||||
# machines, but runtime checks in DPDK will catch those situations.
|
# machines, but runtime checks in DPDK will catch those situations.
|
||||||
|
|
||||||
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
||||||
|
setdefaultconf %{target}
|
||||||
setconf CONFIG_RTE_MACHINE '"%{machine2}"'
|
|
||||||
# Disable experimental features
|
|
||||||
setconf CONFIG_RTE_NEXT_ABI 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
|
|
||||||
%ifnarch %{ix86}
|
|
||||||
setconf CONFIG_RTE_KNI_KMOD y
|
|
||||||
%else
|
|
||||||
setconf CONFIG_RTE_KNI_KMOD n
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86}
|
||||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||||
for flavor in %{flavors_to_build}; do
|
for flavor in %{flavors_to_build}; do
|
||||||
cp -r %{target} %{target}-$flavor
|
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
make CC=gcc-6 V=1 O=%{target}-$flavor T=%{target} %{?_smp_mflags} config
|
||||||
|
setdefaultconf %{target}-$flavor
|
||||||
|
%ifnarch %{ix86}
|
||||||
|
setconf CONFIG_RTE_EAL_IGB_UIO y %{target}-$flavor
|
||||||
|
setconf CONFIG_RTE_KNI_KMOD y %{target}-$flavor
|
||||||
|
%endif
|
||||||
cd %{target}-$flavor
|
cd %{target}-$flavor
|
||||||
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
|
make CC=gcc-6 V=1 %{?_smp_mflags}
|
||||||
cd -
|
cd -
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
@ -227,7 +234,12 @@ export BRP_PESIGN_FILES="*.ko"
|
|||||||
|
|
||||||
for flavor in %{flavors_to_build}; do
|
for flavor in %{flavors_to_build}; do
|
||||||
cd %{target}-$flavor
|
cd %{target}-$flavor
|
||||||
%make_install KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor prefix=%{_usr} libdir=%{_libdir}
|
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
dir=/usr/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
krel=$(make -s -C "$dir" kernelrelease)
|
||||||
|
mkdir -p %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||||
|
#make install expects same kernel for build and target, lets copy it manually
|
||||||
|
install -m644 ../%{target}-$flavor/kmod/*.ko %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||||
cd -
|
cd -
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
14
dpdk.changes
14
dpdk.changes
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 4 15:28:20 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Fix dpdk KMP build fails(bsc#1031750)
|
||||||
|
- enable igb_uio kernel module(fate#322394)
|
||||||
|
- update kernel version for SLES12SP3 4.4.59 for bsc#1031705
|
||||||
|
[*0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 30 16:50:07 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Enable HAVE_VF_VLAN_PROTO for SLE12SP3(bsc#1031705).
|
||||||
|
[+0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 20 15:32:12 CET 2017 - ndas@suse.de
|
Mon Mar 20 15:32:12 CET 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
82
dpdk.spec
82
dpdk.spec
@ -56,6 +56,7 @@ Source1: preamble
|
|||||||
# However, the problem still exists and the fix has to find its way to the
|
# However, the problem still exists and the fix has to find its way to the
|
||||||
# upstream code.
|
# upstream code.
|
||||||
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
||||||
|
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc6
|
BuildRequires: gcc6
|
||||||
@ -141,19 +142,47 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n dpdk-stable-16.11.1
|
%setup -q -n dpdk-stable-16.11.1
|
||||||
%patch1 -p1 -z .enic
|
%patch1 -p1 -z .enic
|
||||||
|
%patch2 -p1 -z .kni
|
||||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# set up a method for modifying the resulting .config file
|
# set up a method for modifying the resulting .config file
|
||||||
function setconf() {
|
function setconf() {
|
||||||
if grep -q ^$1= %{target}/.config; then
|
if grep -q ^$1= $3/.config; then
|
||||||
sed -i "s:^$1=.*$:$1=$2:g" %{target}/.config
|
sed -i "s:^$1=.*$:$1=$2:g" $3/.config
|
||||||
else
|
else
|
||||||
echo $1=$2 >> %{target}/.config
|
echo $1=$2 >> $3/.config
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setdefaultconf()
|
||||||
|
{
|
||||||
|
setconf CONFIG_RTE_MACHINE '"%{machine2}"' $1
|
||||||
|
# Disable experimental features
|
||||||
|
setconf CONFIG_RTE_NEXT_ABI n $1
|
||||||
|
|
||||||
|
# Enable automatic driver loading from this path
|
||||||
|
setconf CONFIG_RTE_EAL_PMD_PATH '"%{pmddir}"' $1
|
||||||
|
|
||||||
|
setconf CONFIG_RTE_LIBRTE_BNX2X_PMD y $1
|
||||||
|
setconf CONFIG_RTE_LIBRTE_PMD_PCAP y $1
|
||||||
|
setconf CONFIG_RTE_LIBRTE_VHOST_NUMA y $1
|
||||||
|
|
||||||
|
setconf CONFIG_RTE_EAL_IGB_UIO n $1
|
||||||
|
setconf CONFIG_RTE_KNI_KMOD n $1
|
||||||
|
|
||||||
|
%if %{with shared}
|
||||||
|
setconf CONFIG_RTE_BUILD_SHARED_LIB y $1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch aarch64 ppc64le
|
||||||
|
setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n $1
|
||||||
|
%endif
|
||||||
|
%ifarch ppc64le
|
||||||
|
setconf CONFIG_RTE_LIBRTE_PMD_RING n $1
|
||||||
|
%endif
|
||||||
|
}
|
||||||
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
|
# In case dpdk-devel is installed, we should ignore its hints about the SDK directories
|
||||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||||
|
|
||||||
@ -168,42 +197,20 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
|
|||||||
# machines, but runtime checks in DPDK will catch those situations.
|
# machines, but runtime checks in DPDK will catch those situations.
|
||||||
|
|
||||||
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
||||||
|
setdefaultconf %{target}
|
||||||
setconf CONFIG_RTE_MACHINE '"%{machine2}"'
|
|
||||||
# Disable experimental features
|
|
||||||
setconf CONFIG_RTE_NEXT_ABI 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
|
|
||||||
%ifnarch %{ix86}
|
|
||||||
setconf CONFIG_RTE_KNI_KMOD y
|
|
||||||
%else
|
|
||||||
setconf CONFIG_RTE_KNI_KMOD n
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86}
|
||||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||||
for flavor in %{flavors_to_build}; do
|
for flavor in %{flavors_to_build}; do
|
||||||
cp -r %{target} %{target}-$flavor
|
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
make CC=gcc-6 V=1 O=%{target}-$flavor T=%{target} %{?_smp_mflags} config
|
||||||
|
setdefaultconf %{target}-$flavor
|
||||||
|
%ifnarch %{ix86}
|
||||||
|
setconf CONFIG_RTE_EAL_IGB_UIO y %{target}-$flavor
|
||||||
|
setconf CONFIG_RTE_KNI_KMOD y %{target}-$flavor
|
||||||
|
%endif
|
||||||
cd %{target}-$flavor
|
cd %{target}-$flavor
|
||||||
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
|
make CC=gcc-6 V=1 %{?_smp_mflags}
|
||||||
cd -
|
cd -
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
@ -225,7 +232,12 @@ export BRP_PESIGN_FILES="*.ko"
|
|||||||
|
|
||||||
for flavor in %{flavors_to_build}; do
|
for flavor in %{flavors_to_build}; do
|
||||||
cd %{target}-$flavor
|
cd %{target}-$flavor
|
||||||
%make_install KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor prefix=%{_usr} libdir=%{_libdir}
|
export RTE_KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
dir=/usr/src/linux-obj/%{_target_cpu}/$flavor
|
||||||
|
krel=$(make -s -C "$dir" kernelrelease)
|
||||||
|
mkdir -p %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||||
|
#make install expects same kernel for build and target, lets copy it manually
|
||||||
|
install -m644 ../%{target}-$flavor/kmod/*.ko %{buildroot}/lib/modules/$krel/extra/dpdk/
|
||||||
cd -
|
cd -
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user