Accepting request 485838 from home:ndas:branches:network
- 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] - 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] OBS-URL: https://build.opensuse.org/request/show/485838 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=43
This commit is contained in:
parent
bd246ac340
commit
76f4489889
@ -22,7 +22,7 @@ index 84826b26e..3d22d8e69 100644
|
||||
-#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,57))))
|
||||
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,59))))
|
||||
#define HAVE_VF_VLAN_PROTO
|
||||
-#endif /* >= 4.9.0 */
|
||||
+#endif /* >= 4.9.0, >= SLES12SP3 */
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
@ -151,13 +151,40 @@ sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
%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
|
||||
if grep -q ^$1= $3/.config; then
|
||||
sed -i "s:^$1=.*$:$1=$2:g" $3/.config
|
||||
else
|
||||
echo $1=$2 >> %{target}/.config
|
||||
echo $1=$2 >> $3/.config
|
||||
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
|
||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||
|
||||
@ -172,42 +199,20 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
|
||||
# machines, but runtime checks in DPDK will catch those situations.
|
||||
|
||||
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
||||
|
||||
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
|
||||
setdefaultconf %{target}
|
||||
|
||||
%ifnarch %{ix86}
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||
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
|
||||
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
|
||||
make CC=gcc-6 V=1 %{?_smp_mflags}
|
||||
cd -
|
||||
done
|
||||
%endif
|
||||
@ -229,7 +234,12 @@ 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}
|
||||
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 -
|
||||
done
|
||||
%endif
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
80
dpdk.spec
80
dpdk.spec
@ -149,13 +149,40 @@ sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
%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
|
||||
if grep -q ^$1= $3/.config; then
|
||||
sed -i "s:^$1=.*$:$1=$2:g" $3/.config
|
||||
else
|
||||
echo $1=$2 >> %{target}/.config
|
||||
echo $1=$2 >> $3/.config
|
||||
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
|
||||
unset RTE_SDK RTE_INCLUDE RTE_TARGET
|
||||
|
||||
@ -170,42 +197,20 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
|
||||
# machines, but runtime checks in DPDK will catch those situations.
|
||||
|
||||
make CC=gcc-6 V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
||||
|
||||
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
|
||||
setdefaultconf %{target}
|
||||
|
||||
%ifnarch %{ix86}
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
|
||||
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
|
||||
make CC=gcc-6 KERNELDIR=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor %{?_smp_mflags}
|
||||
make CC=gcc-6 V=1 %{?_smp_mflags}
|
||||
cd -
|
||||
done
|
||||
%endif
|
||||
@ -227,7 +232,12 @@ 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}
|
||||
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 -
|
||||
done
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user