From 865f62881c35e9bdfa8df896aae0398de6baa1f9 Mon Sep 17 00:00:00 2001 From: yinbin6 Date: Mon, 22 Apr 2024 17:16:49 +0800 Subject: [PATCH] add gazelle-pdump (cherry picked from commit 3d1793ba0dc7dec730a8f15cefc6c6948ed7afd0) --- dpdk.spec | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/dpdk.spec b/dpdk.spec index 1d37c6e..4b199df 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -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 - 23.11-11 +* Mon Apr 22 2024 yinbin - 23.11-12 + add gazelle-pdump + +* Mon Apr 22 2024 yinbin - 23.11-11 remove dpdk-pmds directory to prevent unnecessary pmd so files load * Fri Apr 12 2024 huangdengdui - 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 - 23.11-3 Add support for ppc64le -* Tue Jan 12 2024 jiangheng - 23.11-2 +* Fri Jan 12 2024 jiangheng - 23.11-2 add self-developed patches * Tue Jan 09 2024 jiangheng - 23.11-1 -- Gitee