import dpdk-21.11-1.el8
This commit is contained in:
parent
2b29899c87
commit
1cde36c233
@ -1 +1,2 @@
|
|||||||
cee6b23d62e0a19f6c6d652f4a415b7d62e95796 SOURCES/dpdk-20.11.tar.xz
|
17331a86759beba4b6635ed530ce23b0b73c0744 SOURCES/dpdk-21.11.tar.xz
|
||||||
|
3cc45b133677fbff08e89e65a2120be52ebb27a5 SOURCES/pyelftools-0.27.tar.gz
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/dpdk-20.11.tar.xz
|
SOURCES/dpdk-21.11.tar.xz
|
||||||
|
SOURCES/pyelftools-0.27.tar.gz
|
||||||
|
127
SPECS/dpdk.spec
127
SPECS/dpdk.spec
@ -8,14 +8,11 @@
|
|||||||
#% define date 20191128
|
#% define date 20191128
|
||||||
#% define shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
#% define shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
|
|
||||||
%define ver 20.11
|
%define ver 21.11
|
||||||
%define rel 3
|
%define rel 1
|
||||||
|
|
||||||
%define srcname dpdk
|
%define srcname dpdk
|
||||||
|
|
||||||
%define ninjaver 1.8.2
|
|
||||||
%define mesonver 0.49.2
|
|
||||||
|
|
||||||
Name: dpdk
|
Name: dpdk
|
||||||
Version: %{ver}
|
Version: %{ver}
|
||||||
Release: %{rel}%{?commit0:.%{date}git%{shortcommit0}}%{?dist}
|
Release: %{rel}%{?commit0:.%{date}git%{shortcommit0}}%{?dist}
|
||||||
@ -26,13 +23,6 @@ Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{commit0}.tar.xz
|
|||||||
Source: http://fast.dpdk.org/rel/dpdk-%{ver}.tar.xz
|
Source: http://fast.dpdk.org/rel/dpdk-%{ver}.tar.xz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
||||||
Source1: https://github.com/ninja-build/ninja/archive/v%{ninjaver}.tar.gz#/ninja-build-%{ninjaver}.tar.gz
|
|
||||||
Source2: https://github.com/mesonbuild/meson/releases/download/%{mesonver}/meson-%{mesonver}.tar.gz
|
|
||||||
%else
|
|
||||||
BuildRequires: meson
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Only needed for creating snapshot tarballs, not used in build itself
|
# Only needed for creating snapshot tarballs, not used in build itself
|
||||||
Source100: dpdk-snapshot.sh
|
Source100: dpdk-snapshot.sh
|
||||||
|
|
||||||
@ -59,24 +49,21 @@ ExclusiveArch: x86_64 aarch64 ppc64le
|
|||||||
%define incdir %{_includedir}/%{name}
|
%define incdir %{_includedir}/%{name}
|
||||||
%define pmddir %{_libdir}/%{name}-pmds
|
%define pmddir %{_libdir}/%{name}-pmds
|
||||||
|
|
||||||
%define venvdir %{_builddir}/venv
|
%if 0%{?rhel} && 0%{?rhel} < 9
|
||||||
|
# Fix conflicts with README and MAINTAINERS (included in dpdk-doc < 18.11-2),
|
||||||
%if 0%{?rhel} > 7 || 0%{?fedora}
|
# this affects only RHEL8.
|
||||||
%define _py python3
|
|
||||||
%define _py_exec %{?__python3}
|
|
||||||
%else
|
|
||||||
%define _py python
|
|
||||||
%define _py_exec %{?__python2}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?rhel} > 7
|
|
||||||
# Fix conflicts with README and MAINTAINERS (included in dpdk-doc < 18.11-2)
|
|
||||||
Conflicts: dpdk-doc < 18.11-2
|
Conflicts: dpdk-doc < 18.11-2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: gcc, kernel-headers, zlib-devel, numactl-devel
|
BuildRequires: meson
|
||||||
BuildRequires: doxygen, %{_py}-devel, %{_py}-sphinx
|
%if 0%{?rhel} && 0%{?rhel} < 9
|
||||||
BuildRequires: python3-devel
|
%define pyelftoolsver 0.27
|
||||||
|
Source1: https://github.com/eliben/pyelftools/archive/refs/tags/v%{pyelftoolsver}.tar.gz#/pyelftools-%{pyelftoolsver}.tar.gz
|
||||||
|
%else
|
||||||
|
BuildRequires: python3-pyelftools
|
||||||
|
%endif
|
||||||
|
BuildRequires: gcc, zlib-devel, numactl-devel
|
||||||
|
BuildRequires: doxygen, python3-sphinx
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
BuildRequires: rdma-core-devel >= 15
|
BuildRequires: rdma-core-devel >= 15
|
||||||
%endif
|
%endif
|
||||||
@ -172,7 +159,7 @@ API programming documentation for the Data Plane Development Kit.
|
|||||||
%package tools
|
%package tools
|
||||||
Summary: Tools for setting up Data Plane Development Kit environment
|
Summary: Tools for setting up Data Plane Development Kit environment
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: kmod pciutils findutils iproute %{_py_exec}
|
Requires: kmod pciutils findutils iproute python3
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
%{summary}
|
%{summary}
|
||||||
@ -189,26 +176,16 @@ as L2 and L3 forwarding.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 9
|
||||||
%setup -q -a 1 -a 2 -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
|
%setup -q -a 1 -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
|
||||||
%else
|
%else
|
||||||
%setup -q -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
|
%setup -q -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
|
||||||
%endif
|
%endif
|
||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 9
|
||||||
%{__python3} -m venv --clear %{venvdir}
|
export PYTHONPATH=$(pwd)/pyelftools-%{pyelftoolsver}
|
||||||
pushd ninja-%{ninjaver}
|
|
||||||
%{venvdir}/bin/python configure.py --bootstrap --with-python %{venvdir}/bin/python
|
|
||||||
mv ninja %{venvdir}/bin
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd meson-%{mesonver}
|
|
||||||
%{venvdir}/bin/python setup.py install
|
|
||||||
popd
|
|
||||||
|
|
||||||
export PATH="%{venvdir}/bin:$PATH"
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
ENABLED_DRIVERS=(
|
ENABLED_DRIVERS=(
|
||||||
@ -225,6 +202,7 @@ ENABLED_DRIVERS=(
|
|||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
ENABLED_DRIVERS+=(
|
ENABLED_DRIVERS+=(
|
||||||
|
bus/auxiliary
|
||||||
bus/vmbus
|
bus/vmbus
|
||||||
common/iavf
|
common/iavf
|
||||||
common/mlx5
|
common/mlx5
|
||||||
@ -248,23 +226,61 @@ ENABLED_DRIVERS+=(
|
|||||||
)
|
)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Since upstream doesn't have a way
|
for driver in ${ENABLED_DRIVERS[@]}; do
|
||||||
for driver in drivers/*/*/; do
|
enable_drivers="${enable_drivers:+$enable_drivers,}"$driver
|
||||||
driver=${driver#drivers/}
|
done
|
||||||
driver=${driver%/}
|
|
||||||
[[ " ${ENABLED_DRIVERS[@]} " == *" $driver "* ]] || \
|
# As of 21.11-rc3, following libraries can be disabled:
|
||||||
disable_drivers="${disable_drivers:+$disable_drivers,}"$driver
|
# optional_libs = [
|
||||||
|
# 'bitratestats',
|
||||||
|
# 'gpudev',
|
||||||
|
# 'gro',
|
||||||
|
# 'gso',
|
||||||
|
# 'kni',
|
||||||
|
# 'jobstats',
|
||||||
|
# 'latencystats',
|
||||||
|
# 'metrics',
|
||||||
|
# 'pdump',
|
||||||
|
# 'power',
|
||||||
|
# 'vhost',
|
||||||
|
# ]
|
||||||
|
# If doing any updates, this must be aligned with:
|
||||||
|
# https://access.redhat.com/articles/3538141
|
||||||
|
DISABLED_LIBS=(
|
||||||
|
gpudev
|
||||||
|
kni
|
||||||
|
jobstats
|
||||||
|
power
|
||||||
|
)
|
||||||
|
|
||||||
|
for lib in "${DISABLED_LIBS[@]}"; do
|
||||||
|
disable_libs="${disable_libs:+$disable_libs,}"$lib
|
||||||
done
|
done
|
||||||
|
|
||||||
%meson --includedir=include/dpdk \
|
%meson --includedir=include/dpdk \
|
||||||
--default-library=shared \
|
--default-library=shared \
|
||||||
-Ddisable_drivers="$disable_drivers" \
|
-Ddisable_libs="$disable_libs" \
|
||||||
-Ddrivers_install_subdir=dpdk-pmds \
|
-Ddrivers_install_subdir=dpdk-pmds \
|
||||||
-Denable_docs=true \
|
-Denable_docs=true \
|
||||||
-Dmachine=default \
|
-Denable_drivers="$enable_drivers" \
|
||||||
|
-Dplatform=generic \
|
||||||
-Dmax_ethports=32 \
|
-Dmax_ethports=32 \
|
||||||
-Dmax_numa_nodes=8 \
|
-Dmax_numa_nodes=8 \
|
||||||
-Dtests=false
|
-Dtests=false
|
||||||
|
|
||||||
|
# Check drivers and libraries
|
||||||
|
for driver in "${ENABLED_DRIVERS[@]}"; do
|
||||||
|
config_token=RTE_$(echo $driver | tr [a-z/] [A-Z_])
|
||||||
|
! grep -q $config_token */rte_build_config.h || continue
|
||||||
|
echo "!!! Could not find $driver in rte_build_config.h, please check dependencies. !!!"
|
||||||
|
false
|
||||||
|
done
|
||||||
|
for lib in "${DISABLED_LIBS[@]}"; do
|
||||||
|
config_token=RTE_LIB_$(echo $lib | tr [a-z/] [A-Z_])
|
||||||
|
grep -q $config_token */rte_build_config.h || continue
|
||||||
|
echo "!!! Found $lib in rte_build_config.h. !!!"
|
||||||
|
false
|
||||||
|
done
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -274,13 +290,15 @@ export PATH="%{venvdir}/bin:$PATH"
|
|||||||
|
|
||||||
%meson_install
|
%meson_install
|
||||||
|
|
||||||
# FIXME this file doesn't have chmod +x upstream
|
rm -f %{buildroot}%{_bindir}/dpdk-dumpcap
|
||||||
chmod +x %{buildroot}%{sdkdir}/examples/pipeline/examples/vxlan_table.py
|
|
||||||
|
|
||||||
rm -f %{buildroot}%{_bindir}/dpdk-pdump
|
rm -f %{buildroot}%{_bindir}/dpdk-pdump
|
||||||
rm -f %{buildroot}%{_bindir}/dpdk-proc-info
|
rm -f %{buildroot}%{_bindir}/dpdk-proc-info
|
||||||
rm -f %{buildroot}%{_bindir}/dpdk-test{,-acl,-bbdev,-cmdline,-compress-perf,-crypto-perf,-eventdev,-pipeline,-sad,-fib,-flow-perf,-regex}
|
rm -f %{buildroot}%{_bindir}/dpdk-test{,-acl,-bbdev,-cmdline,-compress-perf,-crypto-perf,-eventdev,-pipeline,-sad,-fib,-flow-perf,-regex}
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
rm -f %{buildroot}%{_libdir}/*.a
|
||||||
|
# Taked from debian/rules
|
||||||
|
rm -f %{docdir}/html/.buildinfo
|
||||||
|
rm -f %{docdir}/html/objects.inv
|
||||||
|
rm -rf %{docdir}/html/.doctrees
|
||||||
|
|
||||||
%files
|
%files
|
||||||
# BSD
|
# BSD
|
||||||
@ -322,6 +340,9 @@ rm -f %{buildroot}%{_libdir}/*.a
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 23 2021 David Marchand <david.marchand@redhat.com> - 21.11-1
|
||||||
|
- Rebase to 21.11 (#2029497)
|
||||||
|
|
||||||
* Tue Feb 16 2021 Timothy Redaelli <tredaelli@redhat.com> - 20.11-3
|
* Tue Feb 16 2021 Timothy Redaelli <tredaelli@redhat.com> - 20.11-3
|
||||||
- Fix gating since on DPDK 20.11 testpmd is called dpdk-testpmd
|
- Fix gating since on DPDK 20.11 testpmd is called dpdk-testpmd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user