Rebase to c9s

Resolves: RHEL-33405
This commit is contained in:
Timothy Redaelli 2024-04-18 15:17:23 +02:00
parent 9b688f0cf4
commit e5db0ea009
6 changed files with 225 additions and 107 deletions

22
.gitignore vendored
View File

@ -1,26 +1,16 @@
/dpdk-1.7.0-20140603git5ebbb1728.tgz /dpdk-stable-16.11.2.tar.xz
/dpdk-1.7.0.tar.gz
/dpdk-2.0.0.tar.gz
/dpdk-2.1.0.tar.gz
/dpdk-2.2.0.tar.gz
/dpdk-16.04.tar.gz
/dpdk-16.07.tar.xz
/dpdk-16.11.tar.xz
/dpdk-17.02.tar.xz
/dpdk-17.05.tar.xz
/dpdk-17.08.tar.xz
/dpdk-17.11.tar.xz /dpdk-17.11.tar.xz
/dpdk-18.02.tar.xz
/dpdk-17.11.1.tar.xz
/dpdk-17.11.2.tar.xz
/dpdk-18.11.tar.xz /dpdk-18.11.tar.xz
/dpdk-18.11.2.tar.xz /dpdk-18.11.2.tar.xz
/dpdk-18.11.6.tar.xz
/dpdk-19.11.tar.xz /dpdk-19.11.tar.xz
/dpdk-19.11.1.tar.xz /dpdk-19.11.1.tar.xz
/dpdk-19.11.2.tar.xz
/dpdk-19.11.3.tar.xz /dpdk-19.11.3.tar.xz
/dpdk-20.11.tar.xz /dpdk-20.11.tar.xz
/dpdk-20.11.1.tar.xz
/dpdk-21.11.tar.xz /dpdk-21.11.tar.xz
/pyelftools-0.27.tar.gz
/dpdk-21.11.1.tar.xz /dpdk-21.11.1.tar.xz
/dpdk-21.11.2.tar.xz /dpdk-21.11.2.tar.xz
/dpdk-22.11.1.tar.xz /dpdk-22.11.tar.xz
/dpdk-23.11.tar.xz

13
dpdk-snapshot.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
snapgit=`git log --pretty=oneline -n1|cut -c1-8`
snapser=`git log --pretty=oneline | wc -l`
makever=`make showversion`
basever=`echo ${makever} | cut -d- -f1`
prefix=dpdk-${basever}-${snapser}.git${snapgit}
archive=${prefix}.tar.gz
echo "Creating ${archive}"
git archive --prefix=${prefix}/ HEAD | gzip -9 > ${archive}

277
dpdk.spec
View File

@ -1,22 +1,35 @@
# Add option to build as static libraries (--without shared) # Add option to build with examples
%bcond_without shared
# Add option to build without examples
%bcond_with examples %bcond_with examples
# Add option to build without tools # Add option to build without tools
%bcond_without tools %bcond_without tools
# Avoid architecture-specific name of build-dir to fix per-arch reproducibility with doxygen # Dont edit Version: and Release: directly, only these:
%global _vpath_builddir %{_vendor}-%{_target_os}-build #% define commit0 7001c8fdb27357c67147c0a13cb3826e48c0f2bf
#% define date 20191128
#% define shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%define ver 23.11
%define rel 1
%define srcname dpdk%(awk -F. '{ if (NF > 2) print "-stable" }' <<<%{version})
%define pyelftoolsver 0.27
Name: dpdk Name: dpdk
Version: 22.11.1 Version: %{ver}
Release: 4%{?dist} Release: %{rel}%{?commit0:.%{date}git%{shortcommit0}}%{?dist}
%if 0%{?fedora} || 0%{?rhel} > 8
Epoch: 2 Epoch: 2
%endif
URL: http://dpdk.org URL: http://dpdk.org
Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz %if 0%{?commit0:1}
Source: https://dpdk.org/browse/dpdk/snapshot/dpdk-%{commit0}.tar.xz
%else
Source: https://fast.dpdk.org/rel/dpdk-%{ver}.tar.xz
%endif
BuildRequires: meson # Only needed for creating snapshot tarballs, not used in build itself
BuildRequires: python3-pyelftools Source100: dpdk-snapshot.sh
Summary: Set of libraries and drivers for fast packet processing Summary: Set of libraries and drivers for fast packet processing
@ -31,18 +44,29 @@ License: BSD and LGPLv2 and GPLv2
# The DPDK is designed to optimize througput of network traffic using, among # The DPDK is designed to optimize througput of network traffic using, among
# other techniques, carefully crafted assembly instructions. As such it # other techniques, carefully crafted assembly instructions. As such it
# needs extensive work to port it to other architectures. # needs extensive work to port it to other architectures.
# ExclusiveArch: x86_64 aarch64 ppc64le
ExclusiveArch: x86_64 i686 aarch64 ppc64le
BuildRequires: gcc %define sdkdir %{_datadir}/%{name}
BuildRequires: kernel-headers, libpcap-devel, doxygen, /usr/bin/sphinx-build, zlib-devel %define docdir %{_docdir}/%{name}
BuildRequires: numactl-devel %define incdir %{_includedir}/%{name}
BuildRequires: rdma-core-devel %define pmddir %{_libdir}/%{name}-pmds
BuildRequires: openssl-devel
BuildRequires: libbpf-devel %if 0%{?rhel} && 0%{?rhel} < 9
BuildRequires: libfdt-devel # Fix conflicts with README and MAINTAINERS (included in dpdk-doc < 18.11-2),
BuildRequires: libatomic # this affects only RHEL8.
BuildRequires: libarchive-devel Conflicts: dpdk-doc < 18.11-2
%endif
BuildRequires: meson
Source1: https://github.com/eliben/pyelftools/archive/refs/tags/v%{pyelftoolsver}.tar.gz#/pyelftools-%{pyelftoolsver}.tar.gz
%if 0%{?rhel} > 8 || 0%{?fedora}
BuildRequires: python3-pyelftools
%endif
BuildRequires: gcc, zlib-devel, numactl-devel, libarchive-devel
BuildRequires: doxygen, python3-sphinx
%ifarch x86_64
BuildRequires: rdma-core-devel >= 15
%endif
%description %description
The Data Plane Development Kit is a set of libraries and drivers for The Data Plane Development Kit is a set of libraries and drivers for
@ -50,11 +74,10 @@ fast packet processing in the user space.
%package devel %package devel
Summary: Data Plane Development Kit development files Summary: Data Plane Development Kit development files
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} python3 Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%if ! %{with shared} %ifarch x86_64
Provides: %{name}-static = %{?epoch:%{epoch}:}%{version}-%{release}
%endif
Requires: rdma-core-devel Requires: rdma-core-devel
%endif
%description devel %description devel
This package contains the headers and other files needed for developing This package contains the headers and other files needed for developing
@ -71,7 +94,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} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: kmod pciutils findutils iproute python3-pyelftools Requires: kmod pciutils findutils iproute python3
%description tools %description tools
%{summary} %{summary}
@ -81,116 +104,190 @@ Requires: kmod pciutils findutils iproute python3-pyelftools
%package examples %package examples
Summary: Data Plane Development Kit example applications Summary: Data Plane Development Kit example applications
BuildRequires: libvirt-devel BuildRequires: libvirt-devel
BuildRequires: make
%description examples %description examples
Example applications utilizing the Data Plane Development Kit, such Example applications utilizing the Data Plane Development Kit, such
as L2 and L3 forwarding. as L2 and L3 forwarding.
%endif %endif
%define sdkdir %{_datadir}/%{name}
%define docdir %{_docdir}/%{name}
%define incdir %{_includedir}/%{name}
%define pmddir %{_libdir}/%{name}-pmds
%pretrans -p <lua>
-- This is to clean up directories before links created
-- See https://fedoraproject.org/wiki/Packaging:Directory_Replacement
directories = {
"/usr/share/dpdk/mk/exec-env/bsdapp",
"/usr/share/dpdk/mk/exec-env/linuxapp"
}
for i,path in ipairs(directories) do
st = posix.stat(path)
if st and st.type == "directory" then
status = os.rename(path, path .. ".rpmmoved")
if not status then
suffix = 0
while not status do
suffix = suffix + 1
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
end
os.rename(path, path .. ".rpmmoved")
end
end
end
%prep %prep
%setup -q -n dpdk%(awk -F. '{ if (NF > 2) print "-stable" }' <<<%{version})-%{version} %if 0%{?rhel} && 0%{?rhel} < 9
%setup -q -a 1 -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
%else
%setup -q -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
%endif
%autopatch -p1
%build %build
CFLAGS="$(echo %{optflags} -fcommon)" \ %if 0%{?rhel} && 0%{?rhel} < 9
%meson --includedir=include/dpdk \ export PYTHONPATH=$(pwd)/pyelftools-%{pyelftoolsver}
-Ddrivers_install_subdir=dpdk-pmds \
-Denable_docs=true \
-Dmachine=generic \
%if %{with examples}
-Dexamples=all \
%endif
%if %{with shared}
--default-library=shared
%else
--default-library=static
%endif %endif
ENABLED_APPS=(
test-pmd
test-bbdev
)
for app in "${ENABLED_APPS[@]}"; do
enable_apps="${enable_apps:+$enable_apps,}"$app
done
ENABLED_DRIVERS=(
bus/pci
bus/vdev
mempool/ring
net/failsafe
net/i40e
net/ring
net/vhost
net/virtio
net/tap
)
%ifarch x86_64
ENABLED_DRIVERS+=(
baseband/acc
bus/auxiliary
bus/vmbus
common/iavf
common/mlx5
common/nfp
net/bnxt
net/enic
net/iavf
net/ice
net/mlx5
net/netvsc
net/nfp
net/qede
net/vdev_netvsc
)
%endif
%ifarch aarch64 x86_64
ENABLED_DRIVERS+=(
net/e1000
net/ixgbe
)
%endif
for driver in "${ENABLED_DRIVERS[@]}"; do
enable_drivers="${enable_drivers:+$enable_drivers,}"$driver
done
# If doing any updates, this must be aligned with:
# https://access.redhat.com/articles/3538141
ENABLED_LIBS=(
bbdev
bitratestats
bpf
cmdline
cryptodev
dmadev
gro
gso
hash
ip_frag
latencystats
member
meter
metrics
pcapng
pdump
security
stack
vhost
)
for lib in "${ENABLED_LIBS[@]}"; do
enable_libs="${enable_libs:+$enable_libs,}"$lib
done
ln -s /usr/bin/true mandb
export PATH=$(pwd):$PATH
%meson --includedir=include/dpdk \
--default-library=shared \
-Ddeveloper_mode=disabled \
-Denable_libs="$enable_libs" \
-Ddrivers_install_subdir=dpdk-pmds \
-Denable_apps="$enable_apps" \
-Denable_docs=true \
-Denable_drivers="$enable_drivers" \
-Dplatform=generic \
-Dmax_ethports=32 \
-Dmax_numa_nodes=8 \
-Dtests=false
# Check drivers and libraries
for driver in "${ENABLED_DRIVERS[@]}"; do
config_token="RTE_$(echo "$driver" | tr [a-z/] [A-Z_])"
! grep -Fqw "$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 "${ENABLED_LIBS[@]}"; do
config_token="RTE_LIB_$(echo "$lib" | tr [a-z/] [A-Z_])"
! grep -Fqw "$config_token" */rte_build_config.h || continue
echo "!!! Could not find $lib in rte_build_config.h, please check dependencies. !!!"
false
done
%meson_build %meson_build
%install %install
%meson_install %meson_install
rm -f %{buildroot}%{_libdir}/*.a
# Taken from debian/rules
rm -f %{buildroot}%{docdir}/html/.buildinfo
rm -f %{buildroot}%{docdir}/html/objects.inv
rm -rf %{buildroot}%{docdir}/html/.doctrees
find %{buildroot}%{_datadir}/man/ -type f -a ! -iname "*rte_*" -exec rm {} \;
%files %files
# BSD # BSD
%doc README MAINTAINERS
%{_bindir}/dpdk-testpmd %{_bindir}/dpdk-testpmd
%{_bindir}/dpdk-proc-info %{_bindir}/dpdk-test-bbdev
%if %{with shared} %dir %{pmddir}
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{pmddir}/*.so.* %{pmddir}/*.so.*
%endif
%files doc %files doc
#BSD #BSD
%exclude %{docdir}/README
%exclude %{docdir}/MAINTAINERS
%{docdir} %{docdir}
%files devel %files devel
#BSD #BSD
%{incdir}/ %{incdir}/
%{sdkdir} %{sdkdir}/
%ghost %{sdkdir}/mk/exec-env/bsdapp
%ghost %{sdkdir}/mk/exec-env/linuxapp
%if %{with tools} %if %{with tools}
%exclude %{_bindir}/dpdk-*.py %exclude %{_bindir}/dpdk-*.py
%endif %endif
%if %{with examples} %if %{with examples}
%exclude %{sdkdir}/examples/ %exclude %{sdkdir}/examples/
%endif %endif
%if ! %{with shared}
%{_libdir}/*.a
%exclude %{_libdir}/*.so
%exclude %{pmddir}/*.so
%else
%{_libdir}/*.so %{_libdir}/*.so
%{pmddir}/*.so %{pmddir}/*.so
%exclude %{_libdir}/*.a
%endif
%{_libdir}/pkgconfig/libdpdk.pc %{_libdir}/pkgconfig/libdpdk.pc
%{_libdir}/pkgconfig/libdpdk-libs.pc %{_libdir}/pkgconfig/libdpdk-libs.pc
%{_datadir}/man
%if %{with examples}
%files examples
%{_bindir}/dpdk-*
%doc %{sdkdir}/examples/
%endif
%if %{with tools} %if %{with tools}
%files tools %files tools
%{_bindir}/dpdk-dumpcap
%{_bindir}/dpdk-pdump
%{_bindir}/dpdk-test
%{_bindir}/dpdk-test-*
%{_bindir}/dpdk-*.py %{_bindir}/dpdk-*.py
%endif %endif
%if %{with examples}
%files examples
%{_bindir}/dpdk_example_*
%doc %{sdkdir}/examples
%endif
%changelog %changelog
* Wed May 15 2024 Timothy Redaelli <tredaelli@redhat.com> - 23.11-1
- Aligned to cs9 (RHEL-33405)
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2:22.11.1-4 * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2:22.11.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

8
gating.yaml Normal file
View File

@ -0,0 +1,8 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: manual.sst_networking.dpdk.tier1}

View File

@ -1 +1,2 @@
SHA512 (dpdk-22.11.1.tar.xz) = 3a7378148a884c1f4a7acef4ae81dbf75eb215e0d6c894f95c273b79dcc533f5edfb6b7872b0c1488be53223014056aa08a9729c7339cb5c91f8426767627421 SHA512 (dpdk-23.11.tar.xz) = e5177d658fca8df55090a92ea1a8932aac5847314fed7c686b8a36e709f34b14c05e68d6c4c433ff5371b67a39c4324b4eefab8c138f417468f57092bf269b4c
SHA512 (pyelftools-0.27.tar.gz) = bb0a00e5500016e3d4f64be0a728e190f84b11a805f78d668b5a74716a30400e6794946f198ef4a3f3b8f64a63deb1b5a96180b09e56b7357b988b28e25fad0a

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: .
run: dpdk-testpmd --help