!567 [sync] PR-565: add gazelle-pdump

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2024-04-22 14:33:35 +00:00 committed by Gitee
commit 6259790eee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -10,7 +10,7 @@
Name: dpdk
Version: 23.11
Release: 11
Release: 12
URL: http://dpdk.org
Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz
@ -51,7 +51,7 @@ Patch6030: 0030-app-testpmd-fix-crash-in-multi-process-forwarding.patch
Patch9013: 0031-add-rte_eth_bond_link_monitoring_get-in-map.patch
Patch9032: 0032-ethdev-fix-strict-aliasing-lead-to-link-cannot-be-up.patch
Patch6032: 0032-ethdev-fix-strict-aliasing-lead-to-link-cannot-be-up.patch
Patch6033: 0033-net-hns3-enable-PFC-for-all-user-priorities.patch
Patch6034: 0034-app-testpmd-fix-RSS-algorithm-choice.patch
@ -91,6 +91,7 @@ BuildRequires: procps-ng
BuildRequires: git
BuildRequires: groff-base
BuildRequires: libibverbs
BuildRequires: chrpath
%define kern_devel_ver %(uname -r)
@ -177,9 +178,25 @@ CFLAGS="$(echo %{optflags} -fcommon)" \
%meson_build
#build gazelle-pdump
cd %{_vpath_builddir}/app/dpdk-pdump.p
export GAZELLE_FLAGS="-lm -lpthread -lrt -lnuma"
# Remove linking to i40e driver for LoongArch because it was not supported in this version
%if "%{arch_type}" == "loongarch64"
export GAZELLE_LIBS="-lrte_pci -lrte_bus_pci -lrte_cmdline -lrte_hash -lrte_mempool -lrte_mempool_ring -lrte_timer -lrte_eal -lrte_gro -lrte_ring -lrte_mbuf -lrte_telemetry -lrte_net_ixgbe -lrte_kvargs -lrte_net_hinic -lrte_net_virtio -lrte_bus_vdev -lrte_net -lrte_rcu -lrte_ethdev -lrte_pdump -lrte_bpf -lrte_security -lrte_cryptodev -lrte_net_pcap -lrte_metrics"
%else
export GAZELLE_LIBS="-lrte_pci -lrte_bus_pci -lrte_cmdline -lrte_hash -lrte_mempool -lrte_mempool_ring -lrte_timer -lrte_eal -lrte_gro -lrte_ring -lrte_mbuf -lrte_telemetry -lrte_net_ixgbe -lrte_kvargs -lrte_net_hinic -lrte_net_i40e -lrte_net_virtio -lrte_bus_vdev -lrte_net -lrte_rcu -lrte_ethdev -lrte_pdump -lrte_bpf -lrte_security -lrte_cryptodev -lrte_net_pcap -lrte_metrics"
%endif
export SECURE_OPTIONS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wall -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -fPIE -pie -fPIC -g"
gcc -o gazelle-pdump ${GAZELLE_FLAGS} ${SOCURE_OPTIONS} -L../../drivers -L../../lib ${GAZELLE_LIBS} pdump_main.c.o
cd -
%install
%meson_install
chrpath -d ./%{_vpath_builddir}/app/dpdk-pdump.p/gazelle-pdump
cp ./%{_vpath_builddir}/app/dpdk-pdump.p/gazelle-pdump $RPM_BUILD_ROOT/%{_bindir}
# move pmd so files in dpdk-pmds directory to /usr/lib64.
# so files in ddpk-pdms directory are loaded by default. remove it to prevent unnecessary so load.
mv -f $RPM_BUILD_ROOT/%{pmddir}/* $RPM_BUILD_ROOT/usr/lib64/
@ -213,6 +230,7 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
%if %{with tools}
%files tools
%{_bindir}/dpdk-*
%{_bindir}/gazelle-*
%exclude %{_bindir}/dpdk-*.py
%exclude %{_bindir}/dpdk-devbind
%endif
@ -224,7 +242,10 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
%endif
%changelog
* Mon Apr 21 2024 yinbin <yinbin8@huawei.com> - 23.11-11
* Mon Apr 22 2024 yinbin <yinbin8@huawei.com> - 23.11-12
add gazelle-pdump
* Mon Apr 22 2024 yinbin <yinbin8@huawei.com> - 23.11-11
remove dpdk-pmds directory to prevent unnecessary pmd so files load
* Fri Apr 12 2024 huangdengdui <huangdengui@huawei.com> - 23.11-10
@ -273,7 +294,7 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko
* Tue Jan 16 2024 peng.zou <peng.zou@shingroup.cn> - 23.11-3
Add support for ppc64le
* Tue Jan 12 2024 jiangheng <jiangheng14@huawei.com> - 23.11-2
* Fri Jan 12 2024 jiangheng <jiangheng14@huawei.com> - 23.11-2
add self-developed patches
* Tue Jan 09 2024 jiangheng <jiangheng14@huawei.com> - 23.11-1